Skip to content

Commit

Permalink
Applied suggested review changes
Browse files Browse the repository at this point in the history
  • Loading branch information
javieranton-zz authored Jan 20, 2021
1 parent 9252be8 commit aba6738
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Ports/iOSPort/nativeSources/CodenameOne_GLAppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -594,6 +594,11 @@ -(void)application:(UIApplication*)application didChangeStatusBarFrame:(CGRect)o

- (void)application:(UIApplication*)application didReceiveLocalNotification:(UILocalNotification*)notification {
CN1Log(@"Received local notification while running: %@", notification);
if( [notification.userInfo valueForKey:@"__ios_id__"] != NULL)
{
NSString* alertValue = [notification.userInfo valueForKey:@"__ios_id__"];
com_codename1_impl_ios_IOSImplementation_localNotificationReceived___java_lang_String(CN1_THREAD_GET_STATE_PASS_ARG fromNSString(CN1_THREAD_GET_STATE_PASS_ARG alertValue));
}
}

#ifndef CN1_USE_ARC
Expand Down

1 comment on commit aba6738

@shannah
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. I'm curious if you've tested this on your devices to make sure, for example, that it doesn't result in notifications being fired twice? I'm always a little uneasy with these callbacks from apple as their docs don't make it clear how it will work when both are implemented. I always need to fire up an app and test again. Just curious if you've done that already.

Please sign in to comment.