Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why PhoneGap always shows default splashscreen image?

I'm testing a sample iOS app now, although I set all new launch images in Xcode (Summary tab of Project Target screen), PhoneGap 3.0 keeps showing its default splashscreen. Why? even when splashscreen is a plugin and not included by default in PhoneGap 3.0 now.

iOS document say about launch images but not splashscreen, and it even strongly recommend us to use a "first screen" similar as launch image, not something like about screen. Are these same?

like image 891
Tien Do Avatar asked Sep 18 '13 07:09

Tien Do


2 Answers

It's not about cleaning or caching issues at all. The problem is PhoneGap includes all possible launch images in project template by default. These files are under Resources folder and copied to bundle's root folder on build event. Although I properly selected my own launch images in Xcode (Target/Summary screen), default PhoneGap's specific files e.g. Default~iphone.png overridden my files :(

Once issue is identified, you can fix it someway, but I prefer below steps:

  1. Delete all default icons and splashscreen files under /platforms/ios/AppName/icons and /splash folders. You surely don't need these placeholder images.

  2. In Xcode, select Targets/AppName, then tab Build Phases, delete all file names of images in the above step in section Copy Bundle Resources.

  3. Add your own images files for app icon and launch images here.

  4. Edit Info.plist file (file AppName-Info.plist under /platforms/ios/AppName/) to include your images, you will need to use CFBundleIcons and UILaunchImageFile keys. Go to iOS developer site for reference.

like image 115
Tien Do Avatar answered Nov 18 '22 02:11

Tien Do


Splashscreen and launch image are the same thing.

You probably did everything right but iOS (especially in the simulator) often just doesn't change those things (splashscreen, icon etc.) during development process. Try to delete your app, clean your project (in Xcode: Product -> Clean (shift+cmd+k)) and reinstall your app.

like image 28
jonas Avatar answered Nov 18 '22 03:11

jonas