简体   繁体   English

iPhone 6(iOS 8.3)问题几秒钟后,Phonegap初始屏幕消失

[英]Phonegap Splash Screen Disappear after few seconds in iPhone 6(iOS 8.3) issue

When i click on application icon in iPhone6 , splash screen is opened but it remains only for 2 seconds and then disappear leads to crashing of app. 当我单击iPhone6中的应用程序图标时,启动屏幕被打开,但仅保留2秒钟,然后消失导致应用程序崩溃。

I have also added splash screens for iPhone 6 and iPhone 6 + of resolution 1242*2208 px (Default-Portrait-736h@3x.png) and 750 *1334(Default-667h@2x.png) in splash folder. 我还为初始文件夹中的分辨率为1242 * 2208 px(Default-Portrait-736h@3x.png)和750 * 1334(Default-667h@2x.png)的iPhone 6和iPhone 6 +添加了初始屏幕。

I am using xcode 6.3.2 with iOS SDK 8.3. 我将xcode 6.3.2与iOS SDK 8.3一起使用。

It is working on iPad and iPod(iOS 8.3). 它适用于iPad和iPod(iOS 8.3)。

The application crash has to come from your code because i just tested a clean project setup with the splashscreen plugin and there is no issue. 应用程序崩溃必须来自您的代码,因为我刚刚使用启动画面插件测试了干净的项目设置,所以没有问题。

Before you start working on a project you should read the very informative readme which is available for every single cordova plugin. 在开始进行项目之前,您应该阅读内容丰富的自述文件,该文件可用于每个cordova插件。

So you want to set the splashscreen duration to another value, no problem. 因此,您想将启动画面的持续时间设置为另一个值,没问题。 Like it is described in the Cordova Splashscreen-Plugin Documentation . 就像Cordova Splashscreen-Plugin文档中所述

navigator.splashscreen.show();

and

setTimeout(function() {
    navigator.splashscreen.hide();
}, 2000);

will do the trick. 会成功的 I would recommend you to call the splashscreen directly after the deviceReady -Event. 我建议您在deviceReady -Event之后直接调用启动屏幕。 Then you should start with your first function and include the ...show() inside it. 然后,您应该从第一个函数开始,并在其中包含...show() The ...hide() goes into your last function and thats all. ...hide()进入最后一个函数,仅此而已。

Here you're able to find the preferences for your config.xml - iOS Quirks 在这里,您可以找到config.xml的首选项-iOS Quirks

Before you use the commands above watch out for the deviceReady-Event which is obligatory for the Splashscreen commands to work! 在使用上述命令之前,请注意deviceReady-Event ,这是Splashscreen命令必不可少的功能!

The issue regarding splashscreen is resloved. 有关启动画面的问题已解决。 I have updated the cordova version to 3.8.0 and created new project with all settings.Finally it works on all devices. 我已将cordova版本更新到3.8.0并使用所有设置创建了新项目。最后,它可在所有设备上使用。 But there is one problem Resources folder does not contain en.lproj,de.lproj and Localizable.strings files .So How do i set localizations for this app?? 但是有一个问题,资源文件夹不包含en.lproj,de.lproj和Localizable.strings文件。那么如何为该应用设置本地化?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM