0

I'm testing my app on a physical device (using a provisioning profile). The device is an iPad Air 2 with iOS version 8.1.

My App wasn't appearing full screen, so I managed to get it full screen following the advice to add Default-568h@2x.png to the project, as per this thread:

Why [UIScreen mainScreen].bounds] is not returning full screen size?

However, upon adding it to images.xcassets, I see this:

enter image description here

Question 1) Why is Xcode complaining about a Missing Default-568h@2x.png launch image when it's clearly there?

So anyway, this made my app start full screen but the launch image was not appearing. Instead, just a plain black screen was showing up during app load.

Question 2) Why wasn't the launch image showing up?

I deleted all the launch images that were eventually added in an attempt to get something working (because this is iOS and trial and error seems to work way more than a logical process). So at the moment, no launch images exist in images.xcassets. However, my app still runs full screen. I removed the already installed app from the device (by making the icon wiggle and tapping the 'X'), selecting Product>Clean from Xcode and building again. No luck. App still appears full screen on future runs. I then attempted to follow the answer by EliSKoren on this thread:

Launch image doesn't update

However, the only reference I could find to launch images were for simulators, not physical devices.

Question 3) Trying really hard not to loose it ... What's happening!? Why is my app still appearing full screen even though I've removed launch images?

Community
  • 1
  • 1
Ash
  • 2,021
  • 2
  • 26
  • 59
  • 1.Go to the launch image path in your resources . 2.Copy paste your image and give the same name default-568h@2x 3.Try to clean and build the project . 4.Then also if you are not seeing the image then just simply delete the application and install it again . – Saheb Singh Sep 09 '15 at 04:45

1 Answers1

2

This is because Xcode provides placeholders for different devices and respective to them being retina or non retina and device sizes. As you can see your image is on a placeholder as "unassigned", So xcode cant figure it out which device it is for, hence the image is not showing. To correct this here is a screenshot --

EDIT

Please migrate to get the launch image assigned to the assets from here enter image description here Click on Launch Image Sources -- Use assets catalogue and the pop up will show and then click on migrate.

enter image description here

As you can see in the attribute inspector, you can choose which device launch image you want and it will give you that. Check by clicking the place holder what image size or resolution it requires and then you just drag and drop those images from finder. Hope this helps

Edit Final

As it turned out OP was using cMake for the xcode project and by default xcode had already a launch image asset JSON installed which had a wrong configuration, Thus creating another Launch Image wasnt overriding the existing JSON as for cmake the earlier config was being loaded. And by default Universal devices was selected but the Device orientation was totally unchecked. Checking device orientation after getting a clean version of the project and letting Xcode decide its default Launch Image assets and filling up images in that JSON fixed the issue with OP. Further discussions are mentioned in the link in the comments.

Community
  • 1
  • 1
Saheb Roy
  • 5,899
  • 3
  • 23
  • 35
  • Thank you, this seems to have solved questions 1 & 2. Will test and respond. – Ash Sep 09 '15 at 08:00
  • check whether your launch image.xib has any image inside of it or not. and also check if your application is set for universal or not. – Saheb Roy Sep 09 '15 at 08:02
  • App still appears full screen. Is there some caching happening on the physical device? – Ash Sep 10 '15 at 01:02
  • delete the app and run it again – Saheb Roy Sep 10 '15 at 01:46
  • Did not work. As suggested in my original question, removing the app from the physical device does not make a difference. When it is built and run again from Xcode, it still starts full screen. – Ash Sep 10 '15 at 03:08
  • I deleted the entire Xcode project (which is not an issue for me since I'm using Cmake to generate it). With a fresh Xcode project and fresh build, the app goes back to starting non full screen. SO there must be something being cached by Xcode itself. – Ash Sep 10 '15 at 03:10
  • You need to delete the app from the simulator or the device NOT the project. – Saheb Roy Sep 10 '15 at 04:46
  • I am not running on the simulator, so that can't be a factor (or can it?). Again...removing the app from the device made no difference. Deleting the entire Xcode project and starting again seemed to clear everything. – Ash Sep 10 '15 at 05:06
  • Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/89218/discussion-between-saheb-roy-and-ash). – Saheb Roy Sep 10 '15 at 05:07