Skip to content
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
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -80,5 +80,4 @@ firebase-debug.log
firestore-debug.log
database-debug.log
ui-debug.log

**/.build/**/*
**/.build/**/*
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ API_AVAILABLE(ios(10.0))
@interface FLTFirebaseMessagingPlugin : FLTFirebasePlugin <FlutterPlugin,
FLTFirebasePlugin,
FIRMessagingDelegate,
UIApplicationDelegate,
UNUserNotificationCenterDelegate>
#else
@interface FLTFirebaseMessagingPlugin
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -225,9 +225,6 @@ - (void)application_onDidFinishLaunchingNotification:(nonnull NSNotification *)n
_initialNotificationGathered = YES;
[self initialNotificationCallback];

#if TARGET_OS_OSX
// For macOS we use swizzling to intercept as addApplicationDelegate does not exist on the macOS
// registrar Flutter implementation.
[GULAppDelegateSwizzler registerAppDelegateInterceptor:self];
[GULAppDelegateSwizzler proxyOriginalDelegateIncludingAPNSMethods];

Expand All @@ -246,7 +243,11 @@ - (void)application_onDidFinishLaunchingNotification:(nonnull NSNotification *)n
didReceiveRemoteNotificationWithCompletionSEL,
method_getImplementation(donorMethod), method_getTypeEncoding(donorMethod));
}
#else
#if !TARGET_OS_OSX
// `[_registrar addApplicationDelegate:self];` alone doesn't work for notifications to be received
// without the above swizzling This commit:
// https://github.com/google/GoogleUtilities/pull/162/files#diff-6bb6d1c46632fc66405a524071cc4baca5fc6a1a6c0eefef81d8c3e2c89cbc13L520-L533
// broke notifications which was released with firebase-ios-sdk v11.0.0
[_registrar addApplicationDelegate:self];
#endif

Expand Down
Loading