CleverTap/clevertap-flutter

iOS sdk is creating conflict with `FirebaseMessaging.onMessageOpenedApp`

Closed this issue · 3 comments

Description :

  • FirebaseMessaging.onMessageOpenedApp is not able to retrieve data when using autoIntegrate.
    CleverTap.autoIntegrate() 
    CleverTapPlugin.sharedInstance()?.applicationDidLaunch(options: launchOptions)

Steps to reproduce :

  • Add the above two lines in Applegate file.
  • Try to send a notification on the token from the admin sdk and tap on the notification.
  • Log if FirebaseMessaging.onMessageOpenedApp gets invoked.

Additional information.

flutter doctor -v
[✓] Flutter (Channel stable, 3.0.5, on macOS 13.0.1 22A400 darwin-arm, locale en-IN)
    • Flutter version 3.0.5 at /Users/dhruvin/Developement/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision f1875d570e (6 months ago), 2022-07-13 11:24:16 -0700
    • Engine revision e85ea0e79c
    • Dart version 2.17.6
    • DevTools version 2.12.2

[✓] Android toolchain - develop for Android devices (Android SDK version 32.1.0-rc1)
    • Android SDK at /Users/dhruvin/Library/Android/sdk
    • Platform android-33, build-tools 32.1.0-rc1
    • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.13+0-b1751.21-8125866)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 14.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • CocoaPods version 1.11.3

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2021.3)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.13+0-b1751.21-8125866)

[✓] IntelliJ IDEA Community Edition (version 2022.1.4)
    • IntelliJ at /Applications/IntelliJ IDEA CE.app
    • Flutter plugin version 70.2.4
    • Dart plugin version 221.6008.17

[✓] VS Code (version 1.74.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.56.0

[✓] Connected device (3 available)
    • Dhruvin’s iPhone (mobile) • 00008030-000D04421112802E • ios            • iOS 16.0.2 20A380
    • macOS (desktop)           • macos                     • darwin-arm64   • macOS 13.0.1 22A400 darwin-arm
    • Chrome (web)              • chrome                    • web-javascript • Google Chrome 108.0.5359.124

[✓] HTTP Host Availability
    • All required HTTP hosts are available

• No issues found!

Dependencies
clevertap_plugin: ^1.5.4

firebase_messaging: ^14.1.3
firebase_core: ^2.3.0
flutter_local_notifications: 9.7.0

Hi @DK070202,

Have you tried manual integration if you want to handle it at your end, means by removing CleverTap.autoIntegrate() as mentioned here: https://developer.clevertap.com/docs/flutter-quick-start-guide#run-your-application

Thanks, @nishant-clevertap. As the team suggested that there will be no impact event if remove this code from an app-delegate file. And we have removed this and it did work.

Hi @DK070202,

I am facing the same issue in Ios. FirebaseMessaging.onMessage. doe not receive notification.
How did you integrate cleverTap push alongside of Firebase ?