xcode 6,launch image, iOS7, iPhon5s iPhone4s - ios

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)

Related

#3x images incorrectly used on iPhone 6 or 5S or 5 in XIB's with the "Use as Launch Image" option set

With-in a clean brand new iOS project I've:
added 2 images to the project "background#2x.png" and "background#3x.png"
added a XIB named "LaunchScreen.xib"
checked the XIB's "Use as Launch Screen" option
added a UIView sub-view to LaunchScreen.xib and set its image name to "background.png"
with-in the project settings, under the targets 'General' settings I've set the 'Launch Screen file' to "LaunchScreen"
Now when I launch the app on any of the devices list below the #3x image is displayed in the resulting launch screen when surely the #2x image should be used.
Problem devices (that all use the #3x resource):
iPhone 5 (iOS 8.0.0)
iPhone 6 (iOS 8.0.0)
iPhone 6 (iOS 8.0.2)
iPhone 5 Simulator (iOS 8.0.0)
iPhone 6 Simulator (iOS 8.0.0)
NOTE that the #2x image is distinctive from the #3x image so I can easily identify which one is being used.
At first I assumed this was a bug with the simulator and was staggered when it occurred on a real device also.
I assume this is yet another iOS8 bug however I guess there's also the possibility that its expected behaviour as the result of the launch screen being cached as a static image of some kind.
Any ideas or potential solutions?
EDIT:
For the benefit of others, I have subsequently found that if the images are instead added to an Images.xcassets image set then the correct behaviour is in-fact observed. HOWEVER this is not an ideal solution for us since we have a very specific image export process which means we are not using an Images.xcassets in out project (there are thousands of images in the app).
I have now also raised a Radar with Apple #18513968
http://openradar.appspot.com/18513968
I've just tried this myself, and get the same behaviour you have mentioned.
By setting the Launch Images Source to "Use Asset Catalog", and adding the Launch Image you can get each device to show its specific background. Some screenshots can be seen here:
Supporting iPhone 6 and iPhone 6+ with different launch/splash screen image for iPad Portrait and Landscape orientations
Looking into it a bit more, I found a website that mention:
http://oleb.net/blog/2014/08/replacing-launch-images-with-storyboards/
"You can use the new adaptive UI features in Interface Builder to fit your layout to different screen sizes. If your scene requires screen-size-specific images, use asset catalogs to define different images per size class."
Maybe that is the only way to do it.

Xcode 6 Migrating to Images assets issues -- Black launch screen

I updated my application to use Image Asset for App Icon and Launch Images i set both with
appropriate image size according to Apple Doc. The issue that I have that for Iphone
and the simulator for (4S/5/5S) the launch image/screen is always black except for
Iphone 6+ but it works fine on iPad. I looked at couple of post here and nothing have
worked as follow
1) deleting the asset catalog and creating a new one
2) adding #2x and 3#x to each file before adding to the catalog
3) removing and redeploying the application
Anyone had that issue when porting image catalog ? Im using Xcode 6
Targeting ios 7 and 8
Thanks
Mike
Update 1
When disabling landscape launch screen appears normally
something i noticed before doing, so on either the device and the simulator
the application starts in landscape even if the device is held in portrait
and then it rotate to portrait. Still trying to solve that issue now
The following steps are worked for me:
Add the images to the project (root directory or Resources folder) with the following nomination (I will describe them into the Portrait launchimages): Degault.png (3.5 inch), Default-567h#2x (4 inch), Default-667h#2x (iPhone 6), Default-736#2x (iPhone 6plus).
Go to the target settings, App Icons And Launch Images on the General tab -> Set the Launch Image Source to not use asset catalog ('Do not use asset catalogs').
Remove the LaunchImage asset from your main image asset
Go to the target settings, App Icons And Launch Images on the General tab -> Set the Launch Image Source to use asset catalog
The XCode 6 is going to ask you about image asset migration from the existing images. Just click to 'Migrate'.
And it worked for me for each kind of devices on iOS7, iOS8.
Note:
If you check the new LaunchImage asset, than you can see it is really strange. It seems to contain only a few image without the images with iPhone6 or iPhone 6plus resolution.
I found that if I go to the app target general tab and remove all device orientations, the launch image will show again (i.e. the black screen goes away). After running the app, I then went back to the app target general tab and restored the desired device orientation and the launch images continue to work as desired.
(My answer should be in the comment section but I can't post it there due to my reputation)
May be these are very basic steps but:
Have you tried doing a full clean and deleting the derived data?
Have you checked the General tab of your target, under App Icons and Launch Images?

Xcode6 image view + Asset Catalog. Image not showing

iOS Newbie here. After the announcement of Xcode 6 and SWIFT, I decided to give it a try.
Now I am three days into iOS development and found a very strange problem.
Problem: On a empty project with only 1 ImageView control, I can't figure out how to display a PNG image.
Here is what I did:
1) Create a single view project.
2) Create a Asset Catalog, add image set, add PNG image.
3) In storyboard, drag Image View Control into the board.
4) Assign image & background color to Image View
Now hit run and simulator shows only the image background but not the image.
Xcode 6, target iOS7.0, ipad 2 simulator(7.1).
Tested the same procedure in Xcode 5 and the image shows correctly. However, I wish to learn SWIFT + Xcode 6. Using Xcode 5 isn't really a solution.
Here is the project package if you care to test it.
I've had a similar problem, but for an Objective-C project. I found this "problem" listed in the release notes:
"Images from asset catalogs in projects with a minimum deployment target of iOS 7 or OS X 10.9 will be available when running on iOS 8 and OS X 10.10, but not iOS 7 and OS X 10.9."
Which I took to mean that you will not see the images if the target device/simulator is not running iOS 8. I've partially confirmed this by deleting the images from the Images.xcassets and copying them into the project as files, then they get loaded and displayed correctly.
So, I take this mean that I should avoid using the Images asset catalog for iOS 7 targets for this release and just copy the images in as files.

Launch images for universal application

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

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