UNNotificationServiceExtension not working on iPhone 5 (iOS 10)

人走茶凉 提交于 2019-12-13 03:49:57

问题


I am not able to intercept push notification via UNNotificationServiceExtension on iPhone 5 running on iOS 10.

The mutable-content flag is set as 1 inside the aps in payload. The same notification is getting intercepted in the extension for iPhone 6S.

Is Notification Service app extension not supported on iPhone5(because of 32-bit maybe)?

I have looked at the documentation and it is no where mentioned that it will work only on specific devices.

Asked the same question in Apple Developer forum as well.


回答1:


Check your deployment target for the extension. it should be same for test device and deployment target. After altering the deployment target to 10.0 the UNNotificationServiceExtension instance called perfectly. May be your iPhone 6S device using 10.1 and match with your UNNotificationServiceExtension deployment target and iPhone 5 using lower version of deployment target. So will not work on iPhone 5.



来源:https://stackoverflow.com/questions/45483018/unnotificationserviceextension-not-working-on-iphone-5-ios-10

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!