1

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:

  1. 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.

  2. 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.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.