我正在尝试在IONIC应用程序中使用Bluemix的混合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)
我不是本地开发者,也不是Cordova插件开发者,所以我不知道应用程序的结构...
我的环境:
有什么建议吗?
答案 0 :(得分:1)
很简单,只需按照文档说明即可。您需要在SDK中进行一些调整才能使SDK正常工作。
http://mbaas-gettingstarted.ng.bluemix.net/hybrid#get-started-with-push
答案 1 :(得分:0)
你必须重新安装一个插件,然后重新安装所有其他没有
的插件 ios plugins目录中的目录,用于避免此错误代码。
更多详情如下:
http://forum.ionicframework.com/t/ionic-build-ios-plugin-errors-exit-code-65/7274