Commit Graph
14 Commits
Author SHA1 Message Date
Chen Liang 5f0118d61f Update all the header path to pod repo relative (#3527)
* update all the path to pod repo relative

* fix a few missed out headers

* reorder the headers
2019-08-08 09:50:35 -07:00
Chen Liang 80faf7455c rename a few methods and properties to fit in the readability (#3498) 2019-08-05 13:14:03 -07:00
Ryan Wilson a1fc9b2603 Fix long line in Messaging library. (#3264) 2019-06-26 10:17:04 -04:00
Chen Liang 7eb1747e4b Adding macOS support for Messaging and InstanceID (#2880) 2019-05-30 15:31:38 -07:00
Maksym Malyhin 76aa880853 GULAppDelegateSwizzler - proxy APNS methods separately (#2835) 2019-04-17 17:35:14 -04:00
Maksym Malyhin 267e9a6ece FIRMessagingRemoteNotificationsProxy updated to use GULAppDelegateSwizzler (#2683) 2019-04-04 09:26:12 -04:00
Maksym Malyhin 04561fe74d FIRMessagingRemoteNotificationsProxy - test only public API with no assumptions on implementation (#2672) 2019-03-28 19:06:04 -04:00
Chen Liang 954e4d5df1 avoid calling [UIApplication sharedApplication] in app extensions (#1503) 2018-07-09 14:33:41 -07:00
Morgan Chen f3eaa93123 Fix missing method in Messaging unswizzle 2018-06-29 11:38:14 -07:00
Chen Liang 14bcf8ff74 remove deprecated data message callback (#1068)
* remove deprecated data message callback
* Fix the issue that swizzling is not setup in recommended data message callback for message tracking.
2018-04-11 11:38:26 -07:00
Paul Beusterien de481f78f0 Add void's to eliminate Xcode 9.1 warnings (#352) 2017-10-09 14:18:11 -07:00
Riz 5496eff88f Don't swizzle missing and optional delegate methods
FCM's swizzling of the user notification center currently swizzles only one of the two optional delegate methods (userNotificationCenter:willPresentNotification:withCompletionHandler:), but not the other (userNotificationCenter:didReceiveNotificationResponse:withCompletionHandler:).

The didReceiveNotificationResponse, if implemented by the delegate, is the sole receiver of all user action on a notification, including simply tapping on the notification itself. Prior to this change, if the developer had implemented didReceiveNotificationResponse, then FCM would not be able to collect this event for analytics.

Additionally, I changed the logic in FIRMessagingRemoteNotificationsProxy to check whether these methods are actually implemented before swizzling them. It was always swizzling, which meant it was adding an implementation if the method didn't exist. This would confuse iOS into thinking the developer did implement these methods and NOT fall back to delivering the notifications to the application delegate.

With this change, if the developer did not implement these methods, then FCM will not swizzle those methods. That keeps the behavior true to what the developer intended.
2017-10-04 18:39:30 -07:00
Riz f67c074ed1 Log an error if for some reason we can't add a method to a class (#24)
Maybe it was already swizzled, or some other issue. Either way, it would be good to log this error, as it might help us / developers diagnose an issue.
2017-05-23 15:16:02 -07:00
Paul Beusterien 98ba64449a Initial 2017-05-15 12:27:07 -07:00