Skip to content

Instantly share code, notes, and snippets.

@javieranton-zz
Last active October 18, 2020 20:20
Show Gist options
  • Save javieranton-zz/891ac0d00ee9c6cdcb7a11b44a3f43f0 to your computer and use it in GitHub Desktop.
Save javieranton-zz/891ac0d00ee9c6cdcb7a11b44a3f43f0 to your computer and use it in GitHub Desktop.
//foreground notifications
//feel free to remove params, this is just an example that passes APN meta fields to your app
public static void iosActivePushReceived(String notifId, String senderId) {
//do stuff. don't forget to encapsulate with Display's runSerially
}
public static void registerPushFromAfterFinishedLaunching() {
//call your native's interfcae registePush() method from here
}
public static void iosPushReceived(String notifId) {
//background push tapped. You could save the notifId/flag in a static field in your app so that your app knows it has to trigger some action in start()
}
public static void iosPushRegistered(String token) {
//you should save the token somewhere so you can send APNs to this device...
}
public static void iosPushError(String error) {
//here you can handle any errors
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment