Skip to content

Commit 91193b5

Browse files
authored
Merge pull request #42 from urbanairship/GH-40
[GH-40] Fix cold start deep link events
2 parents d069d3a + 2702b76 commit 91193b5

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

ios/UARCTModule/UARCTEventEmitter.m

+12-5
Original file line numberDiff line numberDiff line change
@@ -77,25 +77,32 @@ - (BOOL)isObserving {
7777

7878
-(void)deepLinkReceived:(NSString *)deepLink {
7979
id body = @{ @"deepLink" : deepLink };
80-
if ([self sendEventWithName:UARCTDeepLinkEventName body:body]) {
81-
[self.pendingEvents addObject:@{ @"name": UARCTNotificationResponseEventName, @"body": body}];
80+
81+
if (![self sendEventWithName:UARCTDeepLinkEventName body:body]) {
82+
[self.pendingEvents addObject:@{ @"name": UARCTDeepLinkEventName, @"body": body}];
8283
}
8384
}
8485

8586
#pragma mark -
8687
#pragma mark UAPushDelegate
8788

88-
-(void)receivedForegroundNotification:(UANotificationContent *)notificationContent completionHandler:(void (^)())completionHandler {
89+
-(void)receivedForegroundNotification:(UANotificationContent *)notificationContent
90+
completionHandler:(void (^)(void))completionHandler {
91+
8992
[self sendEventWithName:UARCTPushReceivedEventName body:[self eventBodyForNotificationContent:notificationContent]];
9093
completionHandler();
9194
}
9295

93-
-(void)receivedBackgroundNotification:(UANotificationContent *)notificationContent completionHandler:(void (^)(UIBackgroundFetchResult))completionHandler {
96+
-(void)receivedBackgroundNotification:(UANotificationContent *)notificationContent
97+
completionHandler:(void (^)(UIBackgroundFetchResult))completionHandler {
98+
9499
[self sendEventWithName:UARCTPushReceivedEventName body:[self eventBodyForNotificationContent:notificationContent]];
95100
completionHandler(UIBackgroundFetchResultNoData);
96101
}
97102

98-
-(void)receivedNotificationResponse:(UANotificationResponse *)notificationResponse completionHandler:(void (^)())completionHandler {
103+
-(void)receivedNotificationResponse:(UANotificationResponse *)notificationResponse
104+
completionHandler:(void (^)(void))completionHandler {
105+
99106
// Ignore dismisses for now
100107
if ([notificationResponse.actionIdentifier isEqualToString:UANotificationDismissActionIdentifier]) {
101108
completionHandler();

0 commit comments

Comments
 (0)