Receiving remote notification right when the app is activating
please share your way to determine if the app activated due to user's tap on a remote notification.
The method described in Apple docs (checking for "applicationState != UIApplicationStateActive" in didReceiveRemoteNotification) is not always correct:
If the remote notification is delivered right at the time when the app becomes active, it will be considered as false positive for the tap.
If the user open Control Center or Fast App Switcher, the app becomes inactive, though still visible on the screen. In these conditions the check will fail either.
As for #2 - I found topic for that case iOS: Push notifications, UIApplicationStateInactive and fast app switching, but the posted solution doesn't solve the issue #1.
And as I can see there are many apps affected for that issue - Facebook Messenger for example.
链接地址: http://www.djcxy.com/p/67258.html上一篇: 如何增加推送通知徽章iPhone
下一篇: 在应用程序激活时接收远程通知