Launch images for universal application - ios

I am trying to set default launch images from general setting section for my project using xcode 5.
Issue is when I am trying to set launch images for ios 6.1 and prior retina of iPhone and iPad, xcode is forcing me to rename the file name from Default~ipad#2x.png to Default.png and Default~iphone#2x.png to Default.png for iphone. But if both the files having same name get loaded then it is not showing proper launch images as per device type.
Can anyone guide me for the same? I have attached screenshot of error for more information.

Try this. Set the names to Default#2x~ipad.png and Default#2x~iphone.png

Related

Binary is not optimized for iPhone 5 Error when using LaunchScreen.xib

I'm using the LaunchScreen.xib as my Launch Screen and yet I keep on getting this error when trying to publish the app.
Why is this and how to avoid this? Right now I have an empty xib, plain white.
Error:
ERROR ITMS-90096: "Your binary is not optimized for iPhone 5 - New
iPhone apps and app updates submitted must support the 4-inch display
on iPhone 5 and must include a launch image referenced in the
Info.plist under UILaunchImages with a UILaunchImageSize value set to
{320, 568}. Launch images must be PNG files and located at the
top-level of your bundle, or provided within each .lproj folder if you
localize your launch images. Learn more about iPhone 5 support and app
launch images by reviewing the 'iOS Human Interface Guidelines' at
'https://developer.apple.com/library/ios/documentation/UserExperience/Conceptual/MobileHIG/IconsImages/IconsImages.html#//apple_ref/doc/uid/TP40006556-CH14-SW5'
and the 'iOS App Programming Guide' at
'https://developer.apple.com/library/ios/documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/App-RelatedResources/App-RelatedResources.html#//apple_ref/doc/uid/TP40007072-CH6-SW12'."
Image of my info.plist:
I think you are using 7.0 as your Deployment target, so instead of Launch Screen.xib file use Asset Catalog and add all Splash screens, this will solve your problem.
What i have observed for some reason, Default-568h#2x.png is expected to be in root folder. Also Please make sure following points:
All images are in .png format.
If you are adding any background image in app then that should be available for all
device size.
App supports for iPhone 5/5s in all screens.

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.

Debug on iOS device gives wrong screen size

I'm trying to run my application on an iPod 5 (4inch retina screen) but it shows the 3,5 inch version of the application.
On an iPhone 5S it does show the correct screen size. Are there any known settings to accomplish a setup like this and how can I turn it off again?
You need to make sure that you have all the images set in the LaunchImages.
You can find this in the images.xcassets of your project in xcode.
Apparently you also have to assign the Image asset to the project. In your target you see the asset to choose from in the 'app icon and launch images' section, here it pointed to an old & renamed asset.
Changed it to the correct one, removed the derived data and it worked.

xcode 6,launch image, iOS7, iPhon5s iPhone4s

The only consolation I take from this is that apparently I am not the only one having difficulty, specifically generating a launch image. I have googled the issue hundreds of times, consulted the iOS Dev Centre and searched through my rather extensive library of texts on the matter.
How are launch images created in Xcode 6 on an iPhone 5s(iPhone4 s) running iOS 7?
set Launch Images in project setting pageļ¼>general->launch image source
I had this issue because I'm using Xcode 6.1 and my app deployment target is 7.0.
I tried using the asset catalog with my existing images. Doing that gave me this error:
/ObfuscatedProjectPath/Images.xcassets: The launch image set named "LaunchImage" did not have any applicable content.
My solution was to turn off the asset catalog and use the default names for the images:
Default#2x.png (iPhone 4/s size is still supported in iOS7)
Default-568h#2x.png (works for iPhone 5/6/6Plus sizes)

Launch Image on iPad only in PortraitMode (Only device)

I wrote an iPad app and I'm using two different images as launch images.
The iOS simulator shows the proper image during startup but the device always uses the portrait image. I have the right file size (Xcode does NOT give me any warnings)!
I'm using iOS5 Beta 7 with Xcode 4.2
Here is what I did so far:
I double checked all the file sizes
I readded the files to the project,
I build the project from scratch (including 'Clean')
I cleaned the workspace's derived data directory.
I deleted the app completely from the device.
I restarted the device.
I'm running out of ideas.
Any ideas?
In iOS 3.2 and later, an iPad application can provide both landscape and portrait versions of its launch images. Each orientation-specific launch image must include a special modifier string in its filename. The format for orientation-specific launch image filenames is as follows:
basename_usage_specific_modifiers_scale_modifier_device_modifier.png
Application Launch Images.
I solved it. I couldnt find any mistakes. So I removed everything according the launchimage from the project (including entries in info.plist), deleted the derived workspace folder, deleted the app from the device. Inserted the pictures again an set the basename for the image in info.plist. It worked. still don't know why.
Btw: It seems like Xcode 4.2 (and iOS5) changes the sizes of the launch images for the iPad.
iOS < 5: Portrait 768x1004px Landscape: 1024x748px (Source)
iOS = 5: Portrait 768x1024px Landscape: 1024x768px (Source: Image)
I did this:
Rename image to Default-Landscape~ipad.png
In Info.plist register it as
Blockquote
<key>UILaunchImageFile~ipad</key>
<string>${PRODUCT_NAME}/Default.png</string>
Blockquote
and it seems to work...

Resources