Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why won't image import into iphone app's asset catelog using xcode?

I am trying to create a launch image for my (first) iphone app. I have done the following:

  1. created 2 PNG images for this purpose.
    one image is: 640 x 960 pixels the other is: 640 x 1136 pixels

  2. added the above 2 files to my project, under "Supporting Files"

  3. In the asset catalog, I select my "LaunchImage" image set, and set its attributes to only support iPhone Portrait, iOS 7 and above

  4. I try to drag each of images mentioned above from "Supporting files" into the 2 place holder images (Retina and @2x). The images are not accepted. I do not get an error, but the images are never drawn, and the image is not used when the application launches.

  5. If instead I try to import the files by selecting "import" from the context menu, I get the same behavior. No error, no image.

Do I need to do anything else? Like follow a naming convention?

Per what I have read, the names of these files no longer matter - though I have tried naming them: LaunchImage.png (640x960) and [email protected] (640x1136). This has not made any difference.

Any help would be greatly appreciated.

like image 634
Ana M Avatar asked Jan 12 '23 09:01

Ana M


1 Answers

Just change the file extension from "PNG" (upper-case) to "png" (lower-case). I spent a couple of hours futzing around until I finally figured out that was the issue!

Note that screenshots taken with a physical iOS devices have "PNG" extension, and will never work until you change the extension. But screenshots taken on the iOS Simulator have extension "png" and work fine as is.

I've logged this in the Apple Bug Reporter as an XCode Usability issue: 17676619 Can't drag "PNG" to LaunchImages; only "png" works

like image 126
Gerry Beauregard Avatar answered Jan 22 '23 17:01

Gerry Beauregard