Splash screen coming in inverted way? - ios

When i created App the launch image was correct and now its almost a month but when i run the app in device and simulator the splash screen is just inverted!!! i don't know why ???
Please check the attached images,Images are correct but when they
appear inside device or simulator its inverted
I have tried to remove the images and add it gain ,its not working .
Then i have created a new asset catalogs and added corresponding images.But now in iPad 3 its coming correct but iPhone its still wrong

Go to your plist file and look for Supported interface orientations (iPhone)
you will see some thing like the below attached image.
Make sure the sequence of the orientation levels is as shown in the above screen shot.
It worked for me. give it a try.

Related

image view only shows background color in launch screen

I'm having some problems with my app's launch screen storyboard.
When I run the app on an iPhone 5S, the image is displayed. However, when I run the app on an iPhone 8, the background color of the UIImageView is shown.
In the project settings, at App Icons and Launch Images, I am not using an image source (although trying do so doesn't seem to work either) and the Launch Screen File is set to LaunchScreen.
The View Controller has Is Initial View Controller checked and the file has Use as Launch Screen checked. The image set was brought in using Import... and is universal.
I've read through several of the solutions for black screen here, but switching the background color revealed that was where my black screen was coming from.
In the assets file, the image set has 1x # 640x1136, 2x # 1242x2208 & 3x # 1125x2436. I experimented with other combinations, but this is the first set that let me see the actual image on the 5S. I'm pretty sure the issue is not having the right configuration of dimensions in the image set file, but can't be certain.
Any help would be much appreciated. Thanks in advance.
Had the same thing. Working on the simulator but didn't work on the device (or any other possible option). It's just a bug.
Try these until it works:
Turn simulator/device off and then on again.
Hard clean simulator. Turn it off.
Clean/Hard Clean/Delete Derived data
Reboot Xcode
Hope one of these helps.
If not, please include the screenshots of working / non-working app screens.

Xcode 7 Launch Screen images dont load properly

I am trying to make some different launch screens with Xcode 7 ios9.1
for different iOS devices (iPhone iPad)
If you take a look at the following images this is what I've done
Here I have made exactly all the images dimensions that it needs and I have filled out all the table with the images. I have made this by right clicking and selecting New iOS Launch Image.
Here I have set the launch images from LaunchImage.
And here is the launch screen storyboard which I have left it empty.
Now, when I run the app, it doesn't load the loading screen.
You need to Remove one String from your project info.Plist File for Launch splash screen.
It's Launch screen interface file base name.
I attach Screenshot for remove String in .plist file
Here you saw second line just remove from Your file
In addition to Maulik Patel`s answer, I found that if you set launch images improperly, maybe you need to delete the app on your iPhone or simulator, set launch images right and rebuild it again. It works for me. Maybe there is still some cache of settings in the app.

Xcode launch images and full screen issues

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:
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?
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
Click on Launch Image Sources -- Use assets catalogue and the pop up will show and then click on migrate.
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.

Splash screen not visible for iPad, only a black screen gets shown

I have an universal app. The splash screen loads fine for iPhone but the same is not visible on the iPad. Instead a black screen appears in its place. I have gone through the questions posted in this regard and have followed the steps but to no avail. I am using asset catalog in my project. Storyboards have not been used. The names and dimensions of the images used are as follows:
1. Default-Landscape.png (1024x768)
2. Default-Landscape#2x.png (2048x1536)
3. Default-Portrait.png (768x1024)
4. Default-Portrait#2x.png (1536x2048)
5. Default-568h.png (640x1136)
6. Default.png (320x480)
7. Default#2x.png (640x960)
Please let me know if there is anything wrong with the dimensions I am using. The options I have selected for the Attributes Inspector for the Launch image are given in the image below:
Following is the setting for Launch image:
I added the same launch images to a sample app and the launch screen showed up perfectly on iPad.
EDIT:
As per the suggestion of #iphonemaclover, the problem was solved using "You should also remove any other key suffixed with (iPad) or ~ipad." There was a key UILaunchImages~ipad in the plist which I removed. Now the launch screen is properly visible.
Please delete your derived data and clean the your project.
Also reset your simmulater if you running over it.
Hope it will help.
Also check you have selected Universal App in your target setting.
EDIT
You should probably be using an Asset Catalogue for your launch images, which might be what Xcode is expecting. You can see what Xcode is expecting in the General tab for your target:
MORE Suggestion
Q: Why does my app launch to a black screen on iPad?
A: Apps that have been designed only for iPhone may launch to a blank screen when run on an iPad. This is caused by the presence of an empty iPad specific storyboard in the app bundle as well as an iPad specific UIMainStoryboardFile key in the app's Information Property List (Info.plist) file. Both are automatically created by the various Xcode template projects if the Universal option is selected.
...
In Xcode
Look for a file named MainStoryboard_iPad.storyboard in the file navigator. If this file is present, remove it from your project.
In In your app's Information Property List
Look for a key named Main storyboard file base name (iPad) or UIMainStoryboardFile~ipad. If this key is present, remove it. You should also remove any other key suffixed with (iPad) or ~ipad.
Finally, test your app on an iPad or in the iPad simulator and verify that it behaves as expected.
You should add your launch image to your asset catalogue, and make sure the setting shown is configured correctly.
If you don't have one already, you can add an asset catalogue by going to File > New > File, the look under the Resource tab.
Probably not related to most people's problems but I would like to add another possible issue. I had the same problem with my project. I could see my iPad images in X-Code but what I missed was that the title underneath was "unassigned" and not "iPad Portrait" (this was probably because it was a boilerplate React Native project that was initially configured only for iPhone).
After making my app universal, I needed to recreate my LaunchImage set which then had designated placeholders for iPad. I re-added all my images, assigned the new Launch Image set, clean, build and it was fixed. Hopefully it saves someone else some time.
If you're not loading an image in your slash screen do you get the white view? If you're not getting, then your view is not loaded. That is why you're getting a black screen.

Not able to set Launch Image in iOS

I am a newbie in iOS. I want to set Launch Image in my app. And I'm using Asset Catalog. And I know I have to drag and drop the image to the boxes that shows up when I'm using Asset Catalog. But a weird thing which is happening at that time is when I'm trying to drag-drop, it just comes back . As if Xcode is telling me NO PLACE HERE. Xcode doesn't let me set my Launch Images. I'm not able to DROP my images in those boxes. And I know the sizes of my images are quite correct. 640*960, 640*1136, 750*1334, 1242*2208.(And I don't want to use LaunchScreen because it only supports iOS 8 and later.)
It's even more weird that people are down voting without even telling the reason. (If you are not good enough to help at least don't discourage newbies)
Got the solution.
Just answering my question so that if anyone is having same problem then here is the solution. My problem was because by mistake I was using images of "jpg" format where in fact I should have used "png" . Now I'm using "png" and it works perfect.
Click on images.xcassets. You should see app icon in the list. At the bottom of that column there is a plus and minus button. Click the plus button.
Click on new Launch Image in the list. This covers iPad's and iPhone's from iOS 5-8 and covers portrait and landscape.
Launch screen can also be support for ios 8,
What you need to do set the Go to project->Media.xcassets on right side information tab you need to select iOS 7.0 and later sizes.
Then you set your launch screen inside the Launch images.
It will work definitely.
By apple provide the document Adding an iOS App Icon Set or Launch Image Set
Thanks
open Images.xcassets of your project
Drag file one by one on boxes as per its size.
See following image.
After doing all Remove LaunchScreen.xib file from your project
And remove Launch screen interface file base name from your plist file.

Resources