簡體   English   中英

Mobile First Studio混合應用Xcode卡在啟動畫面上

[英]Mobile First Studio Hybrid App Xcode stuck at Splash Screen

我正在使用具有一些基本UI的Hybrid應用程序,該應用程序是使用IBM Mobile First Studio Eclipse插件構建的

我所做的:
簡單的應用程序布局,我想在iPhone上進行測試。 根據IBM知識中心的指導,我將其作為Xcode項目運行。 它是使用Xcode成功構建的,但是不幸的是,以下問題使我無法繼續前進。

問題:
iPhone設備和模擬器都會出現此問題。 在首次啟動期間,該應用程序將在顯示IBM啟動畫面2到3秒鍾后進入第一頁。 但是,在第二次運行該應用程序(在模擬器中)或在殺死該應用程序(在設備中)之后重新打開該應用程序后,該應用程序將無法繼續通過IBM啟動畫面。

Xcode日志:

Oct  1 17:22:05 Test-iPhone6 kernel[0] <Notice>: xpcproxy[2963] Container: /private/var/mobile/Containers/Data/Application/1ABEE18A-1EB8-47E5-B75A-24E461BA67D4 (sandbox)

    Oct  1 17:22:05 Test-iPhone6 SpringBoard[58] <Error>: CGContextSaveGState: invalid context 0x0. If you want to see the backtrace, please set CG_CONTEXT_SHOW_BACKTRACE environmental variable.

    Oct  1 17:22:05 Test-iPhone6 SpringBoard[58] <Error>: CGContextTranslateCTM: invalid context 0x0. If you want to see the backtrace, please set CG_CONTEXT_SHOW_BACKTRACE environmental variable.

    Oct  1 17:22:05 Test-iPhone6 SpringBoard[58] <Error>: CGContextRestoreGState: invalid context 0x0. If you want to see the backtrace, please set CG_CONTEXT_SHOW_BACKTRACE environmental variable.

    Oct  1 17:22:05 Test-iPhone6 SpringBoard[58] <Error>: CGContextSaveGState: invalid context 0x0. If you want to see the backtrace, please set CG_CONTEXT_SHOW_BACKTRACE environmental variable.

    Oct  1 17:22:05 Test-iPhone6 SpringBoard[58] <Error>: CGContextTranslateCTM: invalid context 0x0. If you want to see the backtrace, please set CG_CONTEXT_SHOW_BACKTRACE environmental variable.

    Oct  1 17:22:05 Test-iPhone6 SpringBoard[58] <Error>: CGContextRestoreGState: invalid context 0x0. If you want to see the backtrace, please set CG_CONTEXT_SHOW_BACKTRACE environmental variable.

    Oct  1 17:22:05 Test-iPhone6 firstApp[2963] <Warning>: [DEBUG] [WL_SPLASH] -[WLSplashView updateImage] in WLSplashView.m:189 :: Splash screen image is taken from UILaunchImages: Default-667h

    Oct  1 17:22:05 Test-iPhone6 firstApp[2963] <Warning>: [DEBUG] [WL_CONFIG] -[WLConfig init] in WLConfig.m:69 :: {

            "application id" = firstApp;

            "application version" = "1.0";

            authenticitySharedData = "${authenticitySharedData}";

            buildtime = 1443691154;

            environment = iphone;

            host = "192.168.210.163";

            ignoredFileExtensions = "";

            platformVersion = "7.1.0.0";

            port = 10080;

            protocol = http;

            testWebResourcesChecksum = false;

            wlAppFamily = "";

            wlMainFile = "index.html";

            wlSecureDirectUpdatePublicKey = "";

            wlServerContext = “/hybrid_firstProject/";

            wlShareCookies = “";

            wlShareUserCert = false;

            wlUid = "GMAhWz9yC4Qp9IrBzsM4oQ==";

        }

    Oct  1 17:22:05 Test-iPhone6 firstApp[2963] <Warning>: [DEBUG] [WL_SPLASH] -[WLSplashView updateImage] in WLSplashView.m:189 :: Splash screen image is taken from UILaunchImages: Default-667h

    Oct  1 17:22:05 Test-iPhone6 firstApp[2963] <Warning>: Apache Cordova native platform version 3.7.0 is starting.

    Oct  1 17:22:05 Test-iPhone6 firstApp[2963] <Warning>: Multi-tasking -> Device: YES, App: YES

    Oct  1 17:22:05 Test-iPhone6 firstApp[2963] <Warning>: Unlimited access to network resources

    Oct  1 17:22:05 Test-iPhone6 firstApp[2963] <Warning>: Restoring old webstorage backup. From: '/var/mobile/Containers/Data/Application/1ABEE18A-1EB8-47E5-B75A-24E461BA67D4/Library/WebKit/LocalStorage/file__0.localstorage' To: '/var/mobile/Containers/Data/Application/1ABEE18A-1EB8-47E5-B75A-24E461BA67D4/Library/Caches/file__0.localstorage'.

    Oct  1 17:22:05 Test-iPhone6 firstApp[2963] <Warning>: Removing old webstorage backup: '/var/mobile/Containers/Data/Application/1ABEE18A-1EB8-47E5-B75A-24E461BA67D4/Library/WebKit/LocalStorage/file__0.localstorage'.

    Oct  1 17:22:05 Test-iPhone6 firstApp[2963] <Warning>: [CDVTimer][wlapp] 0.182986ms

    Oct  1 17:22:05 Test-iPhone6 firstApp[2963] <Warning>: [CDVTimer][push] 0.155985ms

    Oct  1 17:22:05 Test-iPhone6 firstApp[2963] <Warning>: [CDVTimer][TotalPluginStartup] 0.817001ms

    Oct  1 17:22:05 Test-iPhone6 firstApp[2963] <Warning>: Unbalanced calls to begin/end appearance transitions for <UIViewController: 0x126e5a9b0>.

    Oct  1 17:22:05 Test-iPhone6 firstApp[2963] <Warning>: Resetting plugins due to page load.

    Oct  1 17:22:05 Test-iPhone6 firstApp[2963] <Error>: App Transport Security has blocked a cleartext HTTP (http://) resource load since it is insecure. Temporary exceptions can be configured via your app's Info.plist file.

    Oct  1 17:22:06 Test-iPhone6 firstApp[2963] <Warning>: Finished load of: file:///var/mobile/Containers/Bundle/Application/20C0066F-DBF8-48EA-896C-51BCCB8302B7/firstApp.app/www/default/index.html

確切地說,您在“簡單應用”中執行的操作是什么?

看來您的應用程序也在嘗試連接到某些服務器,可能是MobileFirst Server。 從以下日志行可以明顯看出這一點:

10月1日17:22:05 Test-iPhone6 firstApp [2963]:由於不安全,應用程序傳輸安全性已阻止了明文HTTP(http://)資源加載。 可以通過應用程序的Info.plist文件配置臨時異常。

啟動iOS 9時會出現這樣的錯誤,因為提到的App Transport Security(ATS)是此版本中的一項新功能,可以防止不安全的連接(HTTP)。

您需要升級到最新的MobileFirst Platform Foundation版本。 更新版本確保混合應用程序將禁用ATS(一旦移至生產環境,則必須重新啟用)。

  1. 如果您是從Eclipse安裝的,則請轉到“幫助”>“檢查更新”並安裝更新。
  2. 完成后,在Eclipse中,導航到your-project \\ apps \\ your-app \\ iphone \\文件夾,然后刪除“本地”文件夾。
  3. 重新生成您的項目,再次在Xcode中打開它,然后再次運行它。

該應用程序現在將成功連接到服務器。

暫無
暫無

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

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