-
Notifications
You must be signed in to change notification settings - Fork 1.7k
GULAppDelegateSwizzler - remote notifications methods and tvOS support #2698
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…DelegateSwizzler [WIP]" This reverts commit b2eabf2.
…public interface with no assumptions on the implementation details
…lementation details assumptions
Conflicts: Example/Messaging/Tests/FIRMessagingRemoteNotificationsProxyTest.m
…s applied to all targets. Move the hook to the top level to avoid confusion.
…etProxyOriginalDelegateOnceToken] at the beginning of each test.
…sts added. Cleanup
…essage:] before calling delegate.
|
Consider targeting the PR to |
|
@paulb777 This PR is just a part of |
…Notification:` for tvOS just in case
| static char const *const kGULHandleBackgroundSessionIMPKey = "GUL_handleBackgroundSessionIMP"; | ||
| static char const *const kGULOpenURLOptionsIMPKey = "GUL_openURLOptionsIMP"; | ||
|
|
||
| #if TARGET_OS_IOS |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Move this to the end of this list and add a comment mentioning this method is only available on iOS and not on tvOS.
| fromClass:realClass]; | ||
| NSValue *continueUserActivityIMPPointer = [NSValue valueWithPointer:continueUserActivityIMP]; | ||
|
|
||
| #if TARGET_OS_IOS |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Move this to the end of the method.
| SEL didReceiveRemoteNotificationWithCompletionSEL = | ||
| @selector(application:didReceiveRemoteNotification:fetchCompletionHandler:); | ||
| if ([anObject respondsToSelector:didReceiveRemoteNotificationWithCompletionSEL]) { | ||
| // Only add the application:didReceiveRemoteNotification:fetchCompletionHandler: method if |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice catch!
| OBJC_ASSOCIATION_RETAIN_NONATOMIC); | ||
| } | ||
|
|
||
| #if TARGET_OS_IOS |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: move to end of the list.
| * | ||
| * @return the current UIApplication if in an app, or nil if in extension or if it doesn't exist. | ||
| */ | ||
| + (nullable UIApplication *)sharedApplication; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why have you moved this to the public header? Do consumers of the AppDelegateSwizzler need this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tejasd I think, I needed it in one of the versions of Messaging, but forgot to remove.
Changes required for #2591.
This is a part of PR #2683. I have to merge the changes first to make sure macOS support is available for FirebaseMessaging