One of the prerequisites within Xcode is setting the 'Default' and 'Default@2x' images for when the iPhone app loads up.
Is it all possible to have a number of Default screens made, inserted into the project in png format and each time the app is loaded, choose a random default screen to use?
You cannot change Default.png. Once the app is shipped - it's "set in stone". Until the next release, that is. The reason is simple (and same why you can't change apps icon). App's bundle is read-only. It is made read only because it is signed by you and by apple. Modifying the contents of the bundle would invalidate the signature.
You can change the default screen in iOS (at least after first launch) by setting UILaunchImageFile property in the info.plist, and then writing a new image to the Documents folder.
eg.
<key>UILaunchImageFile</key>
<string>../Documents/NewDefault.png</string>
then write your random splash to /Documents/NewDefault.png
.
Seems i have to be more prescriptive... I am not suggesting you modify anything in your app bundle at runtime, as has been said, that cannot occur.
But because the /Documents
folder sits next to the .app
folder, you can set the UILaunchImageFile
via a relative path, and then put a file at the path specified when the app runs.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With