_From @mutazmq on October 14, 2017 18:33_
I'm developing an iOS app but I'm still getting the Nativescript splash screen even though I did the following:
Assets.xcassets foldertns platform remove ios and added it again (Just in case there was some caching)But still I'm getting the same default Nativescript image when the app is launched on my device! However iOS simulator doesn't have this problem and shows me the new image.
Using tns version 3.2.0:
"tns-android": {
"version": "3.2.0"
},
"tns-ios": {
"version": "3.2.0"
}
_Copied from original issue: NativeScript/nativescript-angular#1041_
@mutazmq confirming this as a bug.
Tested with iOS11 real device.
Steps to reproduce (no sample application as the issue is reproducible only when changing the images of already installed application)
tns create issue3159 --ngtns run ios --provision <provision-key>app/App_Resources/iOS/Asset.xcassets/LaunchScreen.Center.imagesetplatforms folder and uninstall the application from the real devicetns run ios --provision <provision-key>Workaround
platforms folder from your projectare there any updates on this one?
For a newb like me trying to figure out how to change from the default splash screen to a custom one for the first time by following the instructions this bug is pretty frustrating ;) Thanks for posting the workaround though.
Thanks for the workaround. Can confirm this happens with any changes to images you may make post first installation. Might be worth putting a note on the "Creating App Icons and Launch Screens for iOS" about this as it took me sometime to find this solution.
Any updates on this issue because it still exists today, other than the work-around?
I confirm that this bug also exists on an iOS simulator. My image assets were replaced by the tns resources generate splashes command but my iOS simulator still shows the original NativeScript splash screen.
Update: I find it almost impossible :)
1) I ran a tns platform clean ios
2) I checked searched for all .png files inside my project folder and verified them one-by-one that I cannot see the default nativescript launchscreen
3) I closed and deleted the app from my iOS simulator
4) Then I reran tns run ios
And I still see the default NativeScript splash screen. I don't understand where is it coming from :)
* Update:*
I've also deleted the entire platform directory as suggested in https://github.com/NativeScript/docs/pull/1496. I don't understand where is the builder pulling the blue NativeScript default splash screen :)
@etabakov @rosen-vladimirov Could you please tell me if I'm doing something wrong?
Ok, I confirm that this is a very weird thing (and maybe should be pointed out in the documentation?), I found a solution here:
https://stackoverflow.com/questions/33002829/ios-keeping-old-launch-screen-and-app-icon-after-update
TL;DR:
As a small disclosure: I also opened Xcode, rebuild and redeployed the project before powering down and it did not help at all. I saw the new images in Xcode, but the device was stuck with the old ones. I don't know if that could have an influence on things but definitely turning off/on helped.
UPDATE:
Maybe tns resources generate splashes could rename the resource each time to a unique name. That is said to help in the stackoverflow post I'm referring to above.
Delete app and restart device is not a realistic solution because If Application live and user get update notification then he will just update the app and never going to follow the delete and restart device approach.
I have faced the same issue and find out a solution. Whenever you are going to update splash screen image , you need to change the file name as well. After this you need to change file name binding in LaunchScreen.story board file which is exist in AppResources folder.
Same thing will work for app icon as well.
Any updates on this issue because it still exists today, other than the work-around?
I was pulling hair from my head and in my case restarting a physical device (iphone11) was a key element I forgot. This is image is cached somewhere on the device.
Most helpful comment
@mutazmq confirming this as a bug.
Tested with iOS11 real device.
Steps to reproduce (no sample application as the issue is reproducible only when changing the images of already installed application)
tns create issue3159 --ngtns run ios --provision <provision-key>app/App_Resources/iOS/Asset.xcassets/LaunchScreen.Center.imagesetplatformsfolder and uninstall the application from the real devicetns run ios --provision <provision-key>Result: the defaultNativeScript splash screen is still here instead of the newly placed images.
Workaround
platformsfolder from your project