让OneSignal适用于iOS< 10.x中

时间:2017-10-08 06:02:30

标签: ios iphone push-notification onesignal

我已将OneSignal与应用程序集成在一起。它使用具有com.apple.usernotifications.service值的应用扩展程序,该值在iOS 9.x及更低版本中不可用。有没有办法让应用程序与iOS 9兼容,即使它意味着禁用这些版本上的所有通知?

这是我在iOS 9.0模拟器中运行应用程序时遇到的错误:

Oct  8 09:00:53 users-iMac com.apple.dt.Xcode[790] <Error>: -[SimDevice _sendBridgeRequest:caller:error:]:1811 :: installApplication:withOptions:error:: Error Domain=LaunchServicesError Code=0 "(null)" UserInfo={Error=AppexBundleUnknownExtensionPointIdentifier, ErrorDescription=Appex bundle at /Users/milad/Library/Developer/CoreSimulator/Devices/***/data/Library/Caches/com.apple.mobile.installd.staging/temp.AqheU6/extracted/Payload/***.app/PlugIns/OneSignalNotificationServiceExtension.appex with id com.***.ios.OneSignalNotificationServiceExtension specifies a value (com.apple.usernotifications.service) for the NSExtensionPointIdentifier key in the NSExtension dictionary in its Info.plist that does not correspond to a known extension point.}

它在iOS 10.x及更高版本中运行良好。

1 个答案:

答案 0 :(得分:0)

修复很简单。我deployment target目标的OneSignalNotificationServiceExtension设置为9.0,将其设置为10可以解决问题,而无需将主目标的开发目标设置为10。