2

我想在IONIC應用程序中使用Bluemix的混合SDK,但是在第一步中出現錯誤。Bluemix的HybridPush SDK的構建錯誤

後產生的離子應用:

ionic start PushTeste tabs 
ionic add platform ios 
ionic plugin add com.ibm.mobile.cordova.ibmcloudcode 
ionic plugin add com.ibm.mobile.cordova.ibmpush 
ionic build ios 

我得到以下錯誤:

/Users/DaniloOliveira/tmp/PushIonic/platforms/ios/PushIonic/Plugins/com.ibm.mobile.cordova.ibmpush/CDVIBMPush.m:49:89: error: property 'token' not found on object of type 'AppDelegate *' 
    NSString* token = [[[[((AppDelegate *)[[UIApplication sharedApplication] delegate]).token description] 
                         ^1 error generated. 

** BUILD FAILED ** 


The following build commands failed: CompileC /Users/DaniloOliveira/PushIonic/platforms/ios/build/PushIonic.build/Debug-iphoneos/PushIonic.build/Objects-normal/armv7/CDVIBMPush.o PushIonic/Plugins/com.ibm.mobile.cordova.ibmpush/CDVIBMPush.m normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler (1 failure) Error: /Users/DaniloOliveira/tmp/PushIonic/platforms/ios/cordova/run: Command failed with exit code 65 
    at ChildProcess.whenDone (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:135:23) 
    at ChildProcess.emit (events.js:98:17) 
    at maybeClose (child_process.js:756:16) 
    at Process.ChildProcess._handle.onexit (child_process.js:823:5) 

我不是本地開發商,既不是科爾多瓦插件開發,所以我不知道結構APPE應用程序...

我ENV:

  • 的XCode 6
  • 的Mac 10.9.5
  • iPhone 6 IOS 8.1.1

什麼建議嗎?

回答

1

簡單,只需按照文檔。您需要在SDK中進行一些調整才能使SDK正常工作。

http://mbaas-gettingstarted.ng.bluemix.net/hybrid#get-started-with-push

+0

你能不能說說什麼* *需要作出的調整有何評論?我沒有看到它。 –

+0

http://mbaas-gettingstarted.ng.bluemix.net/hybrid#set-up-push-in-cordova-for-ios –

+0

啊。我很困惑,因爲它與頂層的東西有點分離。只要我添加了插件,我就會收到錯誤信息,但從來沒有收到該錯誤信息。因此,查詢是否「爲iOS設置了推入Cordova」或「在Worklight for iOS中設置IBM推送Bluemix」?我假設#2? –