[英]App stuck on splash screen - ending with an NSException on 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(一旦移至生产环境,则必须重新启用)。
该应用程序现在将成功连接到服务器。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.