我试图在他们的网站上按照给定的文件整合One-signal但是当我通过podfile安装framwork时,此时我的0%依赖
那么如何整合正确的方法???在ios Xcode 8中。
我尝试过这个步骤:
Option A: Use CocoaPods (Recommended)
Setting up CocoaPods on your system if you don't have it already.
Make sure you have the latest 1.1.0 version by running pod --version from the terminal.
Run the following to upgrade sudo gem install cocoapods
1.1 Make sure your current Xcode project is closed.
1.2 Run pod init
1.3 Run echo "pod 'OneSignal'" >> Podfile
NOTE (React Native only) : Run echo "pod 'OneSignal', '~> 1.13.3'" >> Podfile instead.
1.3 Run pod install
1.4 Open the newly created .xcworkspace file.
答案 0 :(得分:1)
我注意到cocoaPods因iOS而失败。我建议采用手动方式。
https://github.com/OneSignal/OneSignal-iOS-SDK
在AppDelegate或您想要激活推送通知的任何地方添加以下代码行(替换为您的凭据):
self.oneSignal = [[OneSignal alloc] initWithLaunchOptions:launchOptions
appId:@"YOUR APP ID IN HERE"
handleNotification:nil];
最后按照我的问题,你准备好了。祝好运! https://stackoverflow.com/a/39135807/2551707