UNNotificationServiceExtension在iPhone 5(iOS 10)上不起作用 [英] UNNotificationServiceExtension not working on iPhone 5 (iOS 10)

查看:229
本文介绍了UNNotificationServiceExtension在iPhone 5(iOS 10)上不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我无法在iOS 10上运行的iPhone 5上通过UNNotificationServiceExtension拦截推送通知.

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

mutable-content标志在有效载荷的aps内部设置为1. iPhone 6S的扩展程序中也拦截了相同的通知.

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.

iPhone5是否不支持Notification Service应用扩展(可能是32位)?

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.

也在Apple Developer论坛中提出了相同的问题.

Asked the same question in Apple Developer forum as well.

推荐答案

检查扩展的部署目标.测试设备和部署目标应该相同.将部署目标更改为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.

这篇关于UNNotificationServiceExtension在iPhone 5(iOS 10)上不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆