Closed huongmt0909 closed 1 week ago
I have import:
import 'package:firebase_in_app_messaging/firebase_in_app_messaging.dart';
class FirebaseInAppMsg {
FirebaseInAppMsg();
Future initialise() async {
FirebaseInAppMessaging.instance;
}
}
And init:
FirebaseInAppMsg firebaseMessaging = FirebaseInAppMsg();
await firebaseMessaging.initialise();
As described https://firebase.flutter.dev/docs/in-app-messaging/get-started
The code works fine with android
Hello @huongmt0909,
Thank you for reporting this issue. Can you please try the latest version of the Firebase plugins and upgrade to the latest version of Flutter?
@TarekkMA I tried the latest version of flutter and firebase_in_app_messaging but the button still doesn't work
This is depndencies after update:
dependencies:
flutter:
sdk: flutter
flutter_localizations:
sdk: flutter
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cached_network_image: ^3.2.3
carousel_slider: ^4.2.1
cupertino_icons: ^1.0.2
dio: ^5.2.1+1
jiffy: ^6.3.1
firebase_auth: ^5.1.1
firebase_core: ^3.1.1
firebase_messaging: ^15.0.2
fluro: ^2.0.5
fluttertoast: ^8.2.2
flutter_local_notifications: ^15.1.0+1
flutter_native_splash: ^2.3.2
flutter_picker: ^2.1.0
flutter_svg: ^2.0.7
flutter_web_frame: ^1.0.0
geolocator: ^9.0.2
google_maps_flutter: ^2.5.0
inspector: ^2.1.0
intl: ^0.19.0
json_annotation: ^4.8.1
json_serializable: ^6.7.1
location: ^5.0.0
package_info_plus: ^4.1.0
payjp_flutter: ^0.5.0
pin_code_fields: ^8.0.1
permission_handler: ^10.4.2
pretty_dio_logger: ^1.3.1
provider: ^6.0.5
shared_preferences: ^2.2.0
shimmer: ^3.0.0
dotted_border: ^2.0.0+3
url_launcher: ^6.1.14
webviewx: ^0.1.0
flutter_rating_bar: ^4.0.1
video_player_web: ^2.0.17
wakelock_plus: ^1.1.0
webview_flutter: ^2.8.0
fastor_app_ui_widget: ^1.2.73
visibility_detector: ^0.4.0+2
scroll_to_index: ^3.0.1
new_version_plus: ^0.0.11
device_info_plus: ^9.1.1
uni_links: ^0.5.1
chewie: ^1.7.5
video_player: ^2.7.2
firebase_analytics: ^11.1.0
connectivity_plus: ^5.0.2
firebase_in_app_messaging: ^0.8.0+2
I've tried it and it's working as expected. When clicking the secondary button, it goes to the linked website. Can you try to share a reproduction repo where this issue is happening?
@TarekkMA Thanks for your feedback This is my test app, when I press the "Open" button, the link https://www.google.com/ is not opened
This is settings:
This is video: https://github.com/firebase/flutterfire/assets/100185689/6f0c7451-3f58-4945-9a34-75e1570b73c3
I am wondering if firebase in-app messaging is conflicting with dependencies in my project :(
Can you share the entire code where I can reproduce this issue? Alternatively, try to create a complete minimal reproduction example to test, since it's working fine on the example app.
@TarekkMA Thanks, but I can't share the code, I'll try removing the dependencies, hope it works well
@TarekkMA I will try to create a sample so I can share the problem that causes the error
@TarekkMA I solved the problem. Cause: import package https://pub.dev/documentation/uni_links/latest/ import 'package:uni_links/uni_links.dart'; I also don't understand why uni_links causes the error. However, now firebase in-app messaging will work fine when I remove uni_links
Is there an existing issue for this?
Which plugins are affected?
In-App Messaging
Which platforms are affected?
iOS
Description
On ios with flutter I have set the action of the "ok" button to "https://www.google.com/", but when I open the app on ios, the test notification modal shows up, but when I click on the ok button, the modal closes and the google.com link is not opened. I want to know what is my problem
Reproducing the issue
Step:
Firebase Core version
2.14.0
Flutter Version
3.10.5
Relevant Log Output
No response
Flutter dependencies
Additional context and comments
No response