midnightclubber
midnightclubber

Reputation: 23

White screen of death after switching to Cordova iOS 6.1.0

My app was working fine on Cordova iOS 5 with UIWebView. But I switched to WKWebView on Cordova iOS 6.1.0 and now all I get is a white screen of death after the splash. How can I get started debugging what is causing this error? Here is my config.xml:

<?xml version='1.0' encoding='utf-8'?>
<widget id="com.test.test" version="1.0.0" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
    <name>Test</name>
    <description>
        A sample Apache Cordova application that responds to the deviceready event.
    </description>
    <author email="[email protected]" href="http://cordova.io">
        Apache Cordova Team
    </author>
    <content src="index.html" />
    <plugin name="cordova-plugin-whitelist" spec="1" />
    <preference name="scheme" value="app" />
    <preference name="hostname" value="localhost" />
    <access origin="*" />
    <allow-navigation href="*" />
    <allow-intent href="http://*/*" />
    <allow-intent href="https://*/*" />
    <allow-intent href="tel:*" />
    <allow-intent href="sms:*" />
    <allow-intent href="mailto:*" />
    <allow-intent href="geo:*" />
    <platform name="android">
        <allow-intent href="market:*" />
    </platform>
    <platform name="ios">
        <allow-intent href="itms:*" />
        <allow-intent href="itms-apps:*" />
    </platform>
</widget>

Upvotes: 0

Views: 2030

Answers (3)

celwell
celwell

Reputation: 1662

If you work with cordova-ios ^6.0.0. you need only to modify your config.xml file:

<platform name="ios">
 <preference name="scheme" value="app" />
 <preference name="hostname" value="localhost" /> 
 ...
</platform>

No need to install any additional plugins.

Source: https://stackoverflow.com/a/74955518/767865

Upvotes: 0

Ketu
Ketu

Reputation: 1718

I recently started on upgrading the Cordova-ios version for my app lots of issues and lessons learned, these are a few of the things you can try to debug the app.

  1. if you are working with Xcode iPhone simulator you can debug the app in Safari this link may give you more info on how to debug
  2. Remove all the plugins and the platform, first. Afterward, add the platform and install plugins one by one, this may help to identify if any of the plugins are having issues.
  3. In the case of my app, the white that was shown was actually from UI but didn't show any content on it, try to have some static content on the first page of your app
  4. in my case, the app used angular and Cordova, routing config needed to be altered to use useHash: true,

Upvotes: 0

Tawpie
Tawpie

Reputation: 271

make sure you don't have the splashscreen plugin installed cordova plugin rm cordova-plugin-splashscreen

Upvotes: 0

Related Questions