Mobile First Studio混合应用程序Xcode陷入启动画面

时间:2015-10-01 10:26:55

标签: ios ibm-mobilefirst

我正在开发一个带有一些基本UI的混合应用程序,使用IBM Mobile First Studio Eclipse插件构建

我做了什么:
简单的应用程序布局,我想在iPhone上测试它。根据IBM Knowledge Center的指南,我将其作为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

1 个答案:

答案 0 :(得分:0)

你在&#34;简单的应用程序中做了什么,确切地说是什么?

看起来您的应用程序也在尝试连接到某个服务器,可能是MobileFirst Server。从这个日志行中可以看出这一点:

  

Oct 1 17:22:05 Test-iPhone6 firstApp [2963]:App Transport   安全性阻止了明文HTTP(http://)资源加载   是不安全的。可以通过您的应用配置临时例外   Info.plist文件。

启动iOS 9会出现这样的错误,因为提到的App Transport Security(ATS)是此版本中的一项新功能,可以防止不安全的连接(HTTP)。

您需要升级到最新的MobileFirst Platform Foundation版本。更新后的版本可确保混合应用程序禁用ATS(迁移到生产环境后必须重新启用)。

  1. 如果您从Eclipse安装了MobileFirst Studio,请转到帮助&gt;检查更新并安装更新。
  2. 完成后,在Eclipse中,导航到您的-project \ apps \ your-app \ iphone \文件夹并删除&#34; native&#34;夹。
  3. 重新构建项目,在Xcode中再次打开它并再次运行它。
  4. 该应用程序现在将成功连接到服务器。