ios - 如何在iOS 10之前的版本中使用UNNotificationServiceExtension运行应用程序?

标签 ios iphone apple-push-notifications richpush serviceextension

我的应用程序实现了新的iOS 10丰富推送NotificationService扩展。

一切都能在iOS 10上按预期工作,但我也想支持iOS 10之前的设备-当然不是丰富推送,而只是常规推送。将Xcode中的部署目标降低到8.0或9.0并尝试在较旧的模拟器或设备上运行时,出现以下错误:

Simulator: The operation couldn’t be completed. (LaunchServicesError error 0.)
Device: This app contains an app extension that specifies an extension point identifier that is not supported on this version of iOS for the value of the NSExtensionPointIdentifier key in its Info.plist.

Apple官方找不到任何内容说明您添加了服务扩展后,您的应用只能在iOS 10+上运行-有人可以确认吗?

最佳答案

Bhavuk Jain谈论的是如何在较旧的ios上支持通知,但不能解决LaunchServicesError。为了解决这个问题,您需要转到“部署信息”下的扩展目标->常规->设置部署目标(在这种情况下为10.0)。

关于ios - 如何在iOS 10之前的版本中使用UNNotificationServiceExtension运行应用程序?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40412905/

相关文章:

ios - 在应用摘要中找不到inApp购买选项

iPhone sdk调用拦截

iphone - 如何在将新行添加到 UITextView 实例时向上 ScrollView ?

iOS8 问题 - 未调用 UIView drawRect

ios - 推送通知出现在 Xcode 输出中但未显示在实际手机上

ios - 如何在 openGL ES 中将 float 组传递给纹理?

ios - Firestore iOS 或查询(whereField ("X",在 : ["Y", "Z"])

ios - 如何快速正确激活约束

ios - 带有 PHP 脚本的 Apple 推送通知不起作用?

ios - APNS - 如何连接到反馈服务