File tree Expand file tree Collapse file tree 3 files changed +7
-6
lines changed
packages/firebase_messaging/firebase_messaging/ios/Classes Expand file tree Collapse file tree 3 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -80,5 +80,4 @@ firebase-debug.log
8080firestore-debug.log
8181database-debug.log
8282ui-debug.log
83-
84- ** /.build /** /*
83+ ** /.build /** /*
Original file line number Diff line number Diff line change @@ -43,6 +43,7 @@ API_AVAILABLE(ios(10.0))
4343@interface FLTFirebaseMessagingPlugin : FLTFirebasePlugin <FlutterPlugin,
4444 FLTFirebasePlugin,
4545 FIRMessagingDelegate,
46+ UIApplicationDelegate,
4647 UNUserNotificationCenterDelegate>
4748#else
4849@interface FLTFirebaseMessagingPlugin
Original file line number Diff line number Diff line change @@ -225,9 +225,6 @@ - (void)application_onDidFinishLaunchingNotification:(nonnull NSNotification *)n
225225 _initialNotificationGathered = YES ;
226226 [self initialNotificationCallback ];
227227
228- #if TARGET_OS_OSX
229- // For macOS we use swizzling to intercept as addApplicationDelegate does not exist on the macOS
230- // registrar Flutter implementation.
231228 [GULAppDelegateSwizzler registerAppDelegateInterceptor: self ];
232229 [GULAppDelegateSwizzler proxyOriginalDelegateIncludingAPNSMethods ];
233230
@@ -246,7 +243,11 @@ - (void)application_onDidFinishLaunchingNotification:(nonnull NSNotification *)n
246243 didReceiveRemoteNotificationWithCompletionSEL,
247244 method_getImplementation (donorMethod), method_getTypeEncoding (donorMethod));
248245 }
249- #else
246+ #if !TARGET_OS_OSX
247+ // `[_registrar addApplicationDelegate:self];` alone doesn't work for notifications to be received
248+ // without the above swizzling This commit:
249+ // https://github.com/google/GoogleUtilities/pull/162/files#diff-6bb6d1c46632fc66405a524071cc4baca5fc6a1a6c0eefef81d8c3e2c89cbc13L520-L533
250+ // broke notifications which was released with firebase-ios-sdk v11.0.0
250251 [_registrar addApplicationDelegate: self ];
251252#endif
252253
You can’t perform that action at this time.
0 commit comments