iPhone X: Incorrect launch-screen orientation used - ios

I am testing image launch-screens on the iPhone X and ran into a strange behavior. So I'd like to request some feedback before opening a radar:
I created a portrait and landscape launch-screen with the dimensions 1125 x 2436 Pixel (portrait) and 2436 x 1125 Pixel (landscape). Then I add them to the asset catalog and they are picked up correctly:
So far so good. Then I run the app on the iPhone X Simulator (I've reset the app before to ensure nothing is cached) and the (stretched) landscape-image is shown.
I validated the png sources to have a valid non-alpha background and am still unable to show the correct launch-screen. I noticed that the portrait image is not even copied to the resulting product:
So that might suggest an issue with Xcode 9. Any feedback is more than welcome, thanks guys!
EDIT: Side-note: When removing the landscape image from the asset-catalog, the portrait one is copied and picked up correctly.
UPDATE 09/29/2017: Apple confirmed that it is indeed an issue in Xcode and it will be given to the related engineering-team.

For the iPhone X, try using a launch screen storyboard instead of launch images.
This is mentioned in the new "Building Apps for iPhone X" video on Apple's developer site: https://developer.apple.com/videos/play/fall2017/201/
(It's mentioned at the 2:50 mark.)
To set a launch screen storyboard, create a storyboard file and choose it from the "Launch Screen File" dropdown in your project settings.

This is finally fixed in Xcode 9.1 Beta 2 and above!

Using only the portrait image (and no landscape one) seems to work, at least on the simulator. Anyhow, iPhone X can launch apps only from portrait. Don't know if this solution will create issues on the actual device (iPhone X isn't available yet at time of this writing). I would guess it doesn't.

This is clearly an xCode 9 bug, i've the same problem, also the filename of the asset is not correct, following previous naming convention there must be 2 files, LaunchImage-1100-Portrait-2436h#3x.png and LaunchImage-1100-Landscape-2436h#3x.png (note why 2436h and not 812h, all the others resolution are expressed in point not pixel)

Related

iPhone XS Max / XR not able to use native resolution when using launch images in Xcode 10

I'm using the old school launch image approach instead of a Launch screen storyboard for unrelated reasons.
Normally when Apple has come out with new physical form factors they have added the ability to include images for the new screen sizes in the image asset catalog, which would in turn enable your app to run at native resolution instead of being scaled up from previously supported resolutions.
However, this time around that does not seem to be the case. This is how the LaunchImage asset looks in the final version of Xcode 10 (i.e. not GM):
As you can see there are no drop-ins for iPhone XS Max or iPhone XR, which both have a different (higher) resolution than iPhone X and iPhone XS.
I have seen other people with the same issue, however without any solution.
I can't seem to find any iOS 12 or Xcode 10 documentation suggesting that Apple only supports storyboards or xibs for launch screens going forward.
I had it set up like on your picture, and then I noticed that in the inspector on the right there is an 'iOS 8.0 and later' section of checkboxes that weren't checked - when I checked the Portrait one, the XS Max and XR boxes appeared. If you have that checked, maybe unchecking and checking it again would fix the problem.
Thanks to #Paulw11 for providing the answer.
As of this writing you have to delete your current LaunchImage asset (of course remember to copy your files to somewhere else first) and the go into your asset catalog and add a new LaunchImage asset. Then it will have the necessary drop-ins:
This seems like a bug to me, unless they're quietly pushing people to use storyboards?

iOS 9 Splash screen is black

My apps' splash screens are all plain black after upgrading to iOS9.
Does anybody know why this is? Some of them are using a .xib splash screen and some are using images, but they're all just black now. Does an app have to be built with Xcode 7 for the splash screen to work in iOS9? Has anyone seen some documentation on whether this is an intended breaking change from Apple?
Thank you!
UPDATE: Looking through the apps again it seems my older apps, which only had a Launch image and no .xib are still displaying correctly, so the issue seems related to the launch screen .xib
UPDATE2:
As hagi pointed out in the comment, after re-installing the very same binary it starts working again so the cause is probably that launch images are generated from the xib whenever the app is installed, and stored somewhere, and then when upgrading to iOS9, for some reason (unintended Apple bug most likely), the generated images are cleared, and the app ends up with no splash. And that's why the old-fashioned launch images are still safe and not affected by this, cause they're already baked into the app.
I'll report it as a bug to Apple.
Easy fix. No need to mess with anything. Xcode 7 just prefers the images to be "Universal".
Click on Assets.xcassets folder
Click the + sign to Import from Project.
Select all images
Done. Now your launch screen works and Xcode is happier.
Same problem here after I updated to iOS 9. Re-installing the app from the App Store seems to solve the problem. I guess, it's an iOS 9 glitch.
I had the exact problem and had a black launch screen after using Xcode 7, and at first re-adding the images in Launch-Screen.xib worked but it went black again.
I fixed this permanently by moving the images referenced by Launch-Screen.xib into an asset catalog, rather than using the png filenames.
Just to point out that once again (as this solution didn't appear in answers, and I've personally lost around two hours when "fixing" that), sometimes, especially when the app is in active development/debugging, it requires iOS device to reboot for the launch screen to be fixed.
Black screen default come because, iOS strictly enforces some a startup images it can be black or any images.
Use UILaunchImages key to the Info.plist file and use a dictionary to describe each launch image.
check following references
A launch storyboard or xib must be provided unless the app requires full screen
I am using xcode7.1 it works. Please download latest xcode7.1
I hope above information will help you.
In the storyboard 'Clears Graphics Context' box unchecked then It works.
What worked for me was
1 - Go to LaunchScreen.storyboard
2 - Select is the initial view controller
enter image description here
And you are good to go.
With me uninstalling the app, or rebooting the device didn't help. I used XCode for 5 more minutes, which is the mean time between failure in XCode and it gave "Unkown error occurred" error, which was very helpful. Of course as an experienced XCode developer I knew what to do, force-quit, clean the project, rebuild.
The first error was solved meanwhile as I had forgotten about that.
The problem maybe because missing image size: .png, #2x.png, #3x.png at LaunchScreen.xib
I made loading screen by LaunchScreen.xib
In this xib has load a image launch.png
But there are missing size launch.png, just exist launch#2x.png and launch#3x.png
After add missing image: launch.png, black square bug is gone.
Starting from iOS9 and Xcode 7 you are required to provide a LaunchScreen.storyboard for your launch screen in order to support the new multitasking feature on iPad.
To opt out of being eligible to participate in Slide Over and Split View, add the UIRequiresFullScreen key to your Xcode project’s Info.plist file and apply the Boolean value YES.
I have fixed this issue after removed Size Classes for LaunchScreen.xib
I used only Auto Layout for it.
I noticed the same issue on the launch screen and have a black square in the middle of the screen.
It might be due to missing images at the specified formats .e.g #2x, #3x etc.
I had the same problem. I downloaded Xcode 7 and upgraded my project to swift 2.0. After recompiling the issue was gone at first but then it started to happen again later on during my tests on other unrelated code.
So far two things get this fixed, in both cases temporarily. Remove the background image, add the same image with another name. New image works for a while. Second, is you resize the image view, and in most cases the image starts to work again, but only for a while.
I submitted my new update to iTunes connect while I was seeing the splash screen. Not sure if this is an operating system issue or app api issue that gets corrected with a recompilation of code.
I also tried enabling and disabling the new Bitcode feature but that didn't help.
I had the same issue with the new iOS 9 project I built using Unity (5.2). To fix that I added the image that I want to show as the launch image to the LaunchScreen-iPad.xib file's Image view.
The common solution of adding the Images in LaunchImage and setting it in Launch Image Source and deleting the entry in Launch Screen File did not solve my issue. The launch image is dependent on the iPhone you are using. Since my app was for iOS 8.0 and greater, choosing it in LaunchImage will ask you to upload only Retine 4.5" and Retina 5.5" images. But these sizes will work for iPhone 6 and 6 Plus. You should upload the images based on the device.
iPhone 4S:640 x 960 (#2x)
iPhone 5:640 x 1136 (#2x)
iPhone 6: 750 x 1334 (#2x) portrait, 1334 x 750 (#2x) landscape
iPhone 6 Plus: 1242 x 2208 (#3x) portrait, 2208 x 1242 (#3x) landscape
I wasted so much time solving the black screen launchimage issue. Hope this helps someone.
We always need to add proper size of image if we are using image.Assets for Launch image and select correct options for launch image Source on Clicking project navigator>General>AppICons and launch images > launch image Source > BrandAssets
If size of launch image is not correct with respect to device on which you are try to running app, then your app will run as iPhone 4 showing black top and bottom bars.
Resizing the image and changing the format to png fixed it for me :
Resize the images (1x => 500 × 825) (2x&3x => 600 × 991)
Change to png
Clean building folder and Derived Data
Restart xcode and simulator

Uploading screenshots to iTunes connect for iPhone 6 and 6+

I'm trying to upload screenshots of my app on iPhone 6 and 6+ and I'm getting a baffling error message:
"One or more screenshots are the wrong size..", see the screenshot below
However, I have checked the apple website and the required size is 750x1334 and 1242x2208
In an attempt to prove I'm not going nuts, screenshot of the properties below.
What am I missing?
This a big problem, I also can't upload screenshots for both 4.7 and 5.5 (I've check them 3 times and they are correct).
Same message as yours.
The error on 6 Plus side is caused by the fact that itunesconnect wants 1242 x 2208 screenshots for portrait and 2208 x 1242 in landscape.
** Update.. Ok, it seems to work now.
I ran into this problem when using screenshots from the Simulator. Solution: Make sure that the scale is 100% (Window->Scale in simulator menu). If you scale the window down (common when simulating hight resolution devices), then the screenshot will also be scaled down...
I have this issue right now. This answer helped me
https://stackoverflow.com/a/26052482/2764408
Just rename them to "1.png" and so on.
It may sounds insane but when I renamed the simulator screenshots to 1.png, 2.png and so on, itunesconnect uploaded them without any errors
UPDATE:
I think that non latin symbols in the filename are the reason of this problem. iOS simulator uses localized date in the screenshot file names.
I'm experiencing the same problem.
Apple just replied, they have new rules, you have to upload your build first. Absolute nonsense.
Sent them link to this thread, problem is on their server side.
UPD: now fixed for me as well. :)
I have a 'simple' way
go on check the image size for a particular screenshot https://help.apple.com/app-store-connect/#/devd274dd925
open your screenshot with preview
modify the size to based on what apple wants adjust image size
then thats it hope you will find it easy
Open your screenshots in Preview application
Go to Tools -> Assign ProfilE
Choose sRGB IEC61966-2.1
Press OK
Then submit your screenshots to Appstore Connects
its fixed for me!.
I was facing the same issue but that was regarding ipad..soo for people who wants 12.9 inch display screenshots to be uploaded..is to select ipad pro as simulator and capture screensho using file and save screenshot and it gets saved on your desktop..just rename the screenshot with 1.png or etc..n upload.....it vl solve ypur problem

auto layout in Xcode 5 ios 7. How to create app that works in both iphone 4 and iphone 5

I own an iphone 4 device and do not have immediate access to iphone 5. I am using the simulator to test things out. I have already tested my app on iphone 4 and its simulator and it looks fine. When I run the app on iphone 5 screens (4-inch screen simulator), the app does not seem to work and I get two black empty spaces on top and bottom (see below):
I suspect there is more to making an app for both iphone 4 and iphone 5 than switching autolayout on (which is the case for me.) I am going to read up on autolayout more now but thought I would throw this in here to confirm if I am not missing something obvious.
Thanks!
UPDATE:
To solve this issue, you need to generate a launch image of size 640X1136. The question is how do you do that since in the simulator you would need this image for it to work properly? The solution is to generate ANY picture of dimension and make it the Default#2x image. LAunch simulator - the app would look normal now. Now you can go ahead and generate a "REAL" launch image of this size and replace the dummy one!
To solve this issue, you need to generate a launch image of size 640X1136. The question is how do you do that since in the simulator you would need this image for it to work properly? It is a chicken and egg problem. The solution is to generate ANY picture of dimension and make it the Default#2x image. LAunch simulator - the app would look normal now. Now you can go ahead and generate a "REAL" launch image of this size and replace the dummy one!

Two status bars at iPhone app startup

This makes no sense, but suddenly one of the iPhone (iOS 5.0 target) apps I'm developing starts up with two (2) statusbars! Furthermore it's not always, only with some installs with some people.
This is the only related question I could find: Why do I see double status bars when starting my app?
App has three default.png files, all created by opening iPhone simulator and taking a screenshot. The files were drag & dropped into project target "Launch Images" section. No yellow warning triangles, so everything should be ok:
Default.png 320 x 480 (iPhone simulator)
Default#2x.png 640 x 960 (iPhone Retina 3.5-inch simulator)
Default-568h#2x.png 640 x 1136 (iPhone Retina 4.0-inch simulator)
Any ideas what could be wrong? Apple docs seem to say this setup is correct - but now even I started to see 2 statusbars at startup!
Update:
Getting crazier! I edited first two files - and saved without edits as-is. Problem fixed. Same with third image - problem remains !!! iPhone Retina 4-inch simulator was started using 3.5-inch launch image !!!
Yep, I labelled the pics. With different numbers.
So first two cases might have been some image file format issues and the third case looks like Apple defect. Any other guesses?
Xcode project target summary has Default-568h#2x.png image in box, it's the real image with correct number, and there is no yellow warning sign. That file does exists in file system, is in same folder as the two other ones and is included in "Copy Bundle Resources" build phase. What else can I check?
I'm not sure why this would be happening irregularly, but I think I have an idea. When you said that you took your screenshots with the iOS simulator, the status bar may have been saved as part of the image. Then, iOS is showing your Default.png squished down by 20px creating the illusion of two status bars during launch.

Resources