Skip to content

Commit

Permalink
Fix for local notifications not firing when app in background.
Browse files Browse the repository at this point in the history
  • Loading branch information
shannah committed Sep 30, 2023
1 parent 2330df7 commit 72199a4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Ports/iOSPort/nativeSources/CodenameOne_GLAppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -439,9 +439,10 @@ - (void)userNotificationCenter:(UNUserNotificationCenter *)center didReceiveNoti
if( [response.notification.request.content.userInfo valueForKey:@"__ios_id__"] != NULL)
{
CN1Log(@"Received local notification while in background: %@", response.notification);
// Note: We currently don't do anything at this point. THe local notification callback
// will be triggered when the user clicks on the notification.
NSString* alertValue = [response.notification.request.content.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));
completionHandler();

return;
}
}
Expand Down

0 comments on commit 72199a4

Please sign in to comment.