Commit Graph
13 Commits
Author SHA1 Message Date
Chen Liang f4ae4a4416 re-enable style script for messaging (#4858) 2020-02-07 14:27:18 -08:00
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 564e33834d use repo-root relative path for unit test files (#3515) 2019-08-07 17:00:01 -07:00
Chen Liang 7eb1747e4b Adding macOS support for Messaging and InstanceID (#2880) 2019-05-30 15:31:38 -07:00
Paul Beusterien 06d36108d8 Add test_spec for FCM (#3088)
* Add test_spec for FCM
* FIRMessagingRemoteNotificationsProxyTest - don't use OCMPartialMock([UIApplication sharedApplication]) to avoid crashing tests on iOS 8 (#3094)
2019-05-28 11:36:31 -07: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 00168257df Make FCM and InstanceID compatible with tvOS (#2428) 2019-03-05 11:57:10 -08:00
Chen Liang bc0329f48d fix the unit test #1451 (#2187) 2018-12-17 10:50:20 -08:00
Paul Beusterien 6eb22aa3a0 Disable failing didReceiveRemoteNotification tests(#1451) (#1452) 2018-06-25 17:16:20 -07:00
Ben Hamilton (Ben Gertzfield) cb1f65dfcf Migrate Firebase off ObjC module @import statements (#992)
* Migrate Firebase off @import statements

* - Migrate tests and test utils from @import to #import.
  - Update Xcode projects for tests to explicitly link in framework deps.
  - Update check_no_module_imports.sh to look for @imports in tests/test utils/
    integration tests.

* Ensure check_no_module_imports.sh explicitly exits with code 0 on success.
2018-03-29 08:44:48 -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
Paul Beusterien 98ba64449a Initial 2017-05-15 12:27:07 -07:00