Skip to content

Instantly share code, notes, and snippets.

@623637646
Last active April 24, 2019 02:54
Show Gist options
  • Save 623637646/89e9abc911c825390ed0ae081e42f284 to your computer and use it in GitHub Desktop.
Save 623637646/89e9abc911c825390ed0ae081e42f284 to your computer and use it in GitHub Desktop.
iOS push notification logic
# iOS 10 or above
1. **Cold start**
1. normal notification
userNotificationCenter:didReceiveNotificationResponse:withCompletionHandler:
2. silent notification
userNotificationCenter:didReceiveNotificationResponse:withCompletionHandler:
2. **Hot start**
1. normal notification
userNotificationCenter:didReceiveNotificationResponse:withCompletionHandler:
2. silent notification
application:didReceiveRemoteNotification:fetchCompletionHandler:
userNotificationCenter:didReceiveNotificationResponse:withCompletionHandler:
3. **In front**
1. normal notification
application:didReceiveRemoteNotification:fetchCompletionHandler:
2. silent notification
application:didReceiveRemoteNotification:fetchCompletionHandler:
# iOS 9
1. **Cold start**
1. normal notification
application:didReceiveRemoteNotification:fetchCompletionHandler:
2. silent notification
application:didReceiveRemoteNotification:fetchCompletionHandler:
2. **Hot start**
1. normal notification
application:didReceiveRemoteNotification:fetchCompletionHandler:
2. silent notification
application:didReceiveRemoteNotification:fetchCompletionHandler:
application:didReceiveRemoteNotification:fetchCompletionHandler:
3. **In front**
1. normal notification
application:didReceiveRemoteNotification:fetchCompletionHandler:
2. silent notification
application:didReceiveRemoteNotification:fetchCompletionHandler:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment