Mobile First Studio Hybrid App Xcode 卡在启动画面
Mobile First Studio Hybrid App Xcode stuck at Splash Screen
我正在使用 IBM Mobile First Studio Eclipse 插件构建具有一些基本 UI 的混合应用程序
我做了什么:
简单的应用程序布局,我想在 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
您在 "simple app" 中到底在做什么?
看起来您的应用程序也在尝试连接到某个服务器,可能是 MobileFirst Server。从以下日志行可以看出这一点:
Oct 1 17:22:05 Test-iPhone6 firstApp[2963] : 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.
从 iOS9 开始,您将收到这样的错误,因为提到的应用程序传输安全 (ATS) 是此版本中的一项新功能,可防止不安全的连接 (HTTP)。
您需要升级到最新可用的 MobileFirst Platform Foundation 版本。更新后的版本确保混合应用程序将禁用 ATS(在移至生产环境后必须重新启用)。
- 如果您从 Eclipse 安装了 MobileFirst Studio,请转至帮助 > 检查更新并安装更新。
- 完成后,在 Eclipse 中,导航至 your-project\apps\your-app\iphone\ 文件夹并删除 "native" 文件夹。
- 重新构建您的项目,在 Xcode 中再次打开它并再次 运行 它。
应用现在将成功连接到服务器。
我正在使用 IBM Mobile First Studio Eclipse 插件构建具有一些基本 UI 的混合应用程序
我做了什么:
简单的应用程序布局,我想在 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
您在 "simple app" 中到底在做什么?
看起来您的应用程序也在尝试连接到某个服务器,可能是 MobileFirst Server。从以下日志行可以看出这一点:
Oct 1 17:22:05 Test-iPhone6 firstApp[2963] : 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.
从 iOS9 开始,您将收到这样的错误,因为提到的应用程序传输安全 (ATS) 是此版本中的一项新功能,可防止不安全的连接 (HTTP)。
您需要升级到最新可用的 MobileFirst Platform Foundation 版本。更新后的版本确保混合应用程序将禁用 ATS(在移至生产环境后必须重新启用)。
- 如果您从 Eclipse 安装了 MobileFirst Studio,请转至帮助 > 检查更新并安装更新。
- 完成后,在 Eclipse 中,导航至 your-project\apps\your-app\iphone\ 文件夹并删除 "native" 文件夹。
- 重新构建您的项目,在 Xcode 中再次打开它并再次 运行 它。
应用现在将成功连接到服务器。