Phonegap 3 white flash after splash

前端 未结 5 2286
無奈伤痛
無奈伤痛 2020-12-15 12:38

I know this has been asked (and answered) several times (Phonegap showing white screen after the splash screen - IOS, Phonegap 2.0 - on app launch a white screen flashes pri

5条回答
  •  星月不相逢
    2020-12-15 13:08

    I was finally able to eliminate the splash flash, but I had to use Cordova to do it. Here are the steps I took:

    In Terminal:

    cordova create ~/path/to/project “com.appname.app” “appName”
    cd ~/path/to/project
    cordova platform add ios
    cordova build
    cordova plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen.git
    cordova build
    

    Use Finder to navigate to ~/path/to/project/platforms/ios/ and double-click projectname.xcodeproj to open the project in Xcode.

    Next, I went in and edited the images. You could do it any number of ways. Here's what I did: In Xcode, navigate to Resources/splash/, right-click the image to change, select Show in Finder and use whatever tools you want to change the images.

    Once finished, head back to Xcode and open the root-level config.xml (Still not sure why there are two config.xml files, but you want the one furthest out in the folder structure). Update the AutoHideSplashScreen property to

    .

    From the Xcode main menu, select Product > Clean and then Product > Build.

    Worked for me repeatedly. I was able to then use the navigator.splashscreen.show() and navigator.splashscreen.hide() methods from my app (which didn't seem to be responding without going through all these steps).

    Hope this helps!

提交回复
热议问题