无法在 ios 中集成 One-Signal 推送通知

unable to integrate One-Signal Push notification in ios

我已经尝试根据他们网站上的给定文档集成 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.

https://documentation.onesignal.com/docs/ios-sdk-setup

我注意到 cocoaPods 失败 iOS。我建议采用手动方式。

  1. 从这里下载 sdk:

https://github.com/OneSignal/OneSignal-iOS-SDK

  1. 将 oneSignal.h 和 .m 导入到您的项目中。
  2. 记得转到功能并激活远程通知
  3. 将这行代码添加到您的 AppDelegate 或您想要激活推送通知的任何地方(替换为您的凭据):

    self.oneSignal = [[OneSignal alloc] initWithLaunchOptions:launchOptions
                                        appId:@"YOUR APP ID IN HERE"
                                        handleNotification:nil];
    
  4. 终于完成我的问题,您就可以开始了。祝你好运!