Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions packages/firebase_messaging/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 5.0.1+1

* Enable support for `onMessage` on iOS using `shouldEstablishDirectChannel`.

## 5.0.1

* Fix error in the logs on startup if unable to retrieve token on startup on Android.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ - (void)handleMethodCall:(FlutterMethodCall *)call result:(FlutterResult)result

result(nil);
} else if ([@"configure" isEqualToString:method]) {
[FIRMessaging messaging].shouldEstablishDirectChannel = true;
[[UIApplication sharedApplication] registerForRemoteNotifications];
if (_launchNotification != nil) {
[_channel invokeMethod:@"onLaunch" arguments:_launchNotification];
Expand Down Expand Up @@ -191,4 +192,9 @@ - (void)messaging:(nonnull FIRMessaging *)messaging
[_channel invokeMethod:@"onToken" arguments:fcmToken];
}

- (void)messaging:(FIRMessaging *)messaging
didReceiveMessage:(FIRMessagingRemoteMessage *)remoteMessage {
[_channel invokeMethod:@"onMessage" arguments:remoteMessage.appData];
}

@end
2 changes: 1 addition & 1 deletion packages/firebase_messaging/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: Flutter plugin for Firebase Cloud Messaging, a cross-platform
messaging solution that lets you reliably deliver messages on Android and iOS.
author: Flutter Team <flutter-dev@googlegroups.com>
homepage: https://github.com/flutter/plugins/tree/master/packages/firebase_messaging
version: 5.0.1
version: 5.0.1+1

flutter:
plugin:
Expand Down