2013-12-17 17 views
2

我有same problem as this user。我使用eclipse(AppCenter - > Run As - > Build All Environments)構建了IBM Worklight AppCenter客戶端應用程序,並在xcode(iphone - > Run As - > Xcode項目)中打開它,並通過xcode在iPhone模擬器中運行應用程序。IBM Worklight - AppCenter應用程序缺失插件'com.ibm.mobile.InstallerPlugin'

在應用程序(用戶名,密碼,服務器,端口,上下文)中輸入我的Worklight服務器憑據後,會顯示「加載」消息,應用程序停止運行。

我已經通過應用程序的JavaScript調試和追蹤問題的應用程序試圖執行一個呼叫到科爾多瓦本地插件:

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

是否有任何將本地庫包含在應用程序中需要執行額外的步驟?

任何幫助將不勝感激。

回答

2

「updateConnection」方法在InstallerPlugin中定義。我認爲這只是第一種被稱爲InstallerPlugin的方法,因此問題可能是您意外刪除了安裝程序插件。

目錄IBMAppCenter /應用/ AppCenter/iphone /本地/ appCenterLib必須包含不同版本libAppCenterInstallerLib.a的:

  • 調試-的iPhoneOS/libAppCenterInstallerLib.a
  • 發佈-的iPhoneOS/libAppCenterInstallerLib.a
  • 調試-iphonesimulator/libAppCenterInstallerLib.a
  • 推出-iphonesimulator/libAppCenterInstallerLib.a

updateConnection方法包含在libAppCenterInstallerLib.a中。

如果缺少這些庫,可以從IBM Worklight的原始安裝目錄複製它們。

請勿在重新生成iphone或Android環境之前刪除IBMAppCenter/apps/AppCenter的本機目錄。如果您刪除了本地目錄,則會刪除這些所需的庫,然後AppCenter客戶端不起作用。

+0

libAppCenterInstallerLib.a文件位於其預期位置。我已經更新了這個問題來反映這一點。 – benand

0

我設法通過升級到Worklight 6.1來解決此問題。

在最近版本科爾多瓦,插件方法簽名has changed.

通過提取libAppCenterInstallerlib.a驗證此的:

AR -x libAppCenterInstallerlib.a

然後運行:

nm IBMAppCenterPlugin.o

查找initInfo或updateConnection方法秒。如果他們在方法簽名中包含:withDict,那麼在最近版本的Cordova中已棄用此方法。

使用Worklight 6.1中的AppCenter項目,我不再看到此問題。

+0

但是,爲什麼你將此作爲答案?刪除它並編輯原始問題或者如果你想要的話,打開另一個問題 –

相關問題