我和这个用户有同样的问题。我已经使用 eclipse(AppCenter -> Run As -> Build All Environments)构建了 IBM Worklight AppCenter 客户端应用程序,在 xcode(iphone -> Run As -> Xcode 项目)中打开它,并通过 xcode 在 iphone 模拟器中运行该应用程序。
在应用程序中输入我的 Worklight 服务器凭据(用户名、密码、服务器、端口、上下文)后,会显示一条“正在加载”消息并且应用程序停止运行。
我已经通过应用程序的 javascript 进行了调试,并将问题追溯到应用程序试图执行对 Cordova 本机插件的调用:
cordova.exec(pSuccessCallback, // Success callback from the plugin
function(e){
console.log("Error connecting to server [code, msg, status] = "
+ e.errorCode + ", "
+ e.errorMsg + ", "
+ e.httpCode);
pFailureCallback(e);
},
'com.ibm.mobile.InstallerPlugin', // Tell cordova to run "com.ibm.mobile.InstallerPlugin" Plugin
'updateConnection', // Tell plugin, which action we want to perform
[pUsername, pPassword, pServerURL]); // Passing list of args to the plugin
此错误消息显示在 xcode 中:IBMAppCenter[2315:70b] 错误:方法“updateConnection:”未在插件“com.ibm.mobile.InstallerPlugin”中定义
实现此插件的本机库位于其预期位置,但应用程序似乎看不到 - IBMAppCenter/apps/AppCenter/iphone/native/appCenterLib:
- 调试-iphoneos/libAppCenterInstallerLib.a
- 发布-iphoneos/libAppCenterInstallerLib.a
- 调试-iphonesimulator/libAppCenterInstallerLib.a
- 发布-iphonesimulator/libAppCenterInstallerLib.a
在应用程序中包含本机库是否需要任何其他步骤?
任何帮助将不胜感激。