簡體   English   中英

IBM Worklight-應用修訂包后,應用程序在啟動屏幕上掛起

[英]IBM Worklight - App hang at splash screen after applying FixPack

在設備上應用FixPack 1(用於Worklight 6.1.01)之后,我們注意到iOS中出現一些意外行為。 我們在iOS 6和7.1上都嘗試過,它們都顯示相同的行為。

我們已將用於部署的應用程序的版本號從1.2增加到1.3。 當用戶嘗試通過AppCenter Mobile客戶端更新應用程序時,安裝后,該應用程序將僅停留在帶有IBM徽標的初始屏幕上。 只有刪除/卸載應用程序,然后再次重新安裝,應用程序才能照常運行。

我們在xcode中檢查控制台日志,並打印出以下內容:

May 26 13:16:42 MY-iPad profiled[713] <Notice>: (Note ) profiled: Service stopping.
May 26 13:16:42 MY-iPad kernel[0] <Debug>: launchd[714] Container: /private/var/mobile/Applications/284CEAF0-8B89-467C-BA55-0F277FFA6521 (sandbox)
May 26 13:16:42 MY-iPad backboardd[28] <Error>: HID: The 'Passive' connection 'MyMobileApp' access to protected services is denied.
May 26 13:16:42 MY-iPad MyMobileApp[714] <Warning>: [DEBUG] [WORKLIGHT] -[WLCordovaAppDelegate handleAppWebResources:] in WLCordovaAppDelegate.m:373 :: NativeInitUntilWebViewLoad : START
May 26 13:16:42 MY-iPad MyMobileApp[714] <Warning>: [DEBUG] [OCLogger] Max file size exceeded for log messages.
May 26 13:16:42 MY-iPad MyMobileApp[714] <Warning>: Web resources integrity test is disabled.
May 26 13:16:42 MY-iPad MyMobileApp[714] <Warning>: Application windows are expected to have a root view controller at the end of application launch
May 26 13:16:42 MY-iPad MyMobileApp[714] <Warning>: Multi-tasking -> Device: YES, App: YES
May 26 13:16:42 MY-iPad MyMobileApp[714] <Warning>: Unlimited access to network resources
May 26 13:16:42 MY-iPad MyMobileApp[714] <Warning>: [CDVTimer][splashscreen] 15.210986ms
May 26 13:16:42 MY-iPad MyMobileApp[714] <Warning>: [CDVTimer][TotalPluginStartup] 17.367005ms
May 26 13:16:42 MY-iPad MyMobileApp[714] <Warning>: WARNING: AutoHideSplashScreen key in Cordova.plist is missing or set to NO! SplashScreen will display indefinitley unless you manually hide it. Set value to YES to autohide.
May 26 13:16:42 MY-iPad MyMobileApp[714] <Warning>: [DEBUG] [WORKLIGHT] -[WLCordovaAppDelegate postInitOnMainThread:] in WLCordovaAppDelegate.m:303 :: NativeInitUntilWebViewLoad : END
May 26 13:16:42 MY-iPad MyMobileApp[714] <Warning>: [DEBUG] [OCLogger] Max file size exceeded for log messages.
May 26 13:16:42 MY-iPad MyMobileApp[714] <Warning>: Resetting plugins due to page load.
May 26 13:16:42 MY-iPad MyMobileApp[714] <Warning>: Failed to load webpage with error: The requested URL was not found on this server.

在將應用程序部署到App Store后 ,對該問題進行了一些搜索,導致此Worklight 6.1“拒絕訪問受保護的服務” 盡管行為不同,但這是一個類似的問題。

到目前為止,我們已經指示用戶在升級應用程序之前清除所有數據,但是我們無法繼續使用此方法,因為設備中將存在一些關鍵數據,我們無法簡單地刪除這些數據以升級應用程序。

任何信息或想法,對此表示贊賞。

UPDATE

我們嘗試使用服務器配置工具重新部署該應用程序,但仍然存在相同的問題。 我們檢查了Fixpack安裝日志,沒有錯誤報告。 另外,IBM Installation Manager還會顯示安裝的版本是最新的6.1.01,並且不允許我進行更新,只能進行修改。

更新2

刪除后, native文件夾,並重新部署應用程序(從.wlapp文件到.ipa文件),仍然會出現同樣的問題。 但是,觀察到圖案。

如果重新構建並重新部署了該應用程序,則從AppCenter進行的首次安裝將照常運行,不會有任何問題,這意味着即使代碼和版本號沒有更改,數據也將得以保留並且應用程序可以正常運行。 但是,如果您再次單擊install按鈕再次安裝,則會出現問題。

我發現了-工作燈中有一個錯誤(不是cordova)。

在文件中:

helloHelloIphone / Classes / hello.m,Xcode調試器報告以下自動生成的worklight代碼正在為“ startPage”加載錯誤的值:

-(void)wlInitDidCompleteSuccessfully
{
    UIViewController* rootViewController = self.window.rootViewController;

    // Create a Cordova View Controller
    CDVViewController* cordovaViewController = [[CDVViewController alloc] init] ;

    cordovaViewController.startPage = [[WL sharedInstance] mainHtmlFilePath];

因為“ startPage”的值原來是:

       @"worklight:///Users/mrhines/Library/Application Support/iPhone Simulator/6.1/Applications/A2E1427C-7DFF-4843-BF3D-0B7E4B470E43/hello.app/www/default/(null)”

這顯然是錯誤的-字符串的末尾應顯示“ index.html”,而不是null。

因此,通過用以下行替換上面的代碼的最后一行:

       cordovaViewController.startPage = [[[WL sharedInstance] mainHtmlFilePath] stringByReplacingOccurrencesOfString:@"(null)" withString:@"index.html"];

我的應用程序可靠地啟動,並經過了掛起的初始屏幕,從而修復了Worklight中的錯誤。

IBM已發布了針對該問題的快速修復補丁,並且在將其安裝到開發服務器上之后,一切看起來很好。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM