且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

UNNotificationServiceExtension在iPhone 5(iOS 10)上不起作用

更新时间:2023-02-06 11:57:00

检查扩展的部署目标.测试设备和部署目标应该相同.将部署目标更改为10.0后,UNNotificationServiceExtension实例完美调用. 可能是使用10.1的iPhone 6S设备,并且与UNNotificationServiceExtension部署目标和使用较低版本部署目标的iPhone 5匹配.因此在iPhone 5上将无法使用.

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.