Reputation: 140
I can't get a launch image to display on my iPod touch 4. I'm using Xcode 4.3.3.
I've added this to my Info.plist file:
<key>UILaunchImageFile</key>
<string>Default</string>
I've copied Default.png to the AppData folder in the xcappdata package and uploaded using the Organizer. The image dimensions are 320 x 480. I've also tried putting the image in the root of the xcappdata package, but this as no effect either. Am I uploading the image correctly?
I've also tried to drag and drop the image to 'Launch images' on the Xcode target summary tab, but this has no effect (the icon still says 'No image specified').
I've searched through the device log under Organizer->Console and don't see any errors or warnings related to loading the image. Is there a way to see diagnostic information for launch image loading?
Upvotes: 0
Views: 3499
Reputation: 21
To display the launch image for longer you can do the following in the AppDelegate.m
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary*)launchOptions
{
// Override point for customization after application launch.
sleep(10);
return YES;
}
Upvotes: 0
Reputation: 95
For Xcode 4.6, using the Organizer Documentation section, search for "App-Related Resources" or "iOS App Programming Guide". App-Related Resources should be a section in the "iOS App Programming Guide".
This document mentions:
"You must include one or more icons in your app bundle. The system uses these icons when presenting your app on the device’s home screen. For information about how to specify app icons, see “App Icons.”
AND
"All launch images must be PNG files and must reside in the top level of your app’s bundle directory. "
This is so that Xcode can find them...
Upvotes: 1
Reputation: 14427
You really made this way too complicated. Xcode has a UI for you to browse and pick the icons and launch images for all resolutions. It takes care of copying the files into the project and modifying the project settings / plist file. See image below.
Upvotes: 1
Reputation: 140
I found the solution. The image needs to be copied to the root of the .app bundle, not the .xcappdata bundle as I was doing. Maybe I'm blind, but I can't find this mentioned in the documentation. In my case it works without being added to the Xcode project.
Upvotes: 3