2016-12-12 41 views
1

我試圖整合的一個信號按給定的在其網站上的文件,但是當我通過podfile安裝framwork,在這個時候,我得到了0%的扶養無法一信號按通知在IOS

所以如何整合整合合適的方式?在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

+0

是的,這裏也一樣。任何解決方案 – Mark

+0

是的,我得到了解決方案,問題是創建pod文件 –

+1

謝謝...... – Mark

回答

0

我已經注意到的CocoaPods失敗與iOS。我建議採用手動方式。

  1. 從這裏下載SDK:

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

  • 導入oneSignal.h和.M到您的項目。
  • 記得去功能並激活遠程通知
  • 添加的代碼,這段臺詞在你的AppDelegate或任何你想激活推送通知(請以您的憑據):

    self.oneSignal = [[OneSignal alloc] initWithLaunchOptions:launchOptions 
                appId:@"YOUR APP ID IN HERE" 
                handleNotification:nil]; 
    
  • 最後按照我的問題,你準備好了。祝你好運! https://stackoverflow.com/a/39135807/2551707