Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

moonman239

Cancelled
Original poster
Mar 27, 2009
1,541
32
I have an image called Play button.png in my app's bundle. It shows up just fine in Interface Builder, but it's not there when I run it on my device. I'm beginning to think I'm breaking a file naming convention or two. Am I right?

Edit: I renamed it to play-button.png & pointed the button in my app to the correct image, and the device still gives me the same error message (of course, with a different file name mentioned)

Edit #2: According to SIPS, this PNG has 8 bits per sample, and 4 samples per pixel.
 
Last edited:

PhoneyDeveloper

macrumors 68040
Sep 2, 2008
3,114
93
It's best not to have spaces in file names. The file system on the device is case sensitive while the file system on your Mac most likely is case insensitive. Are you using an @2x version of the file? Are you using Images.xcassets to store your images? Does the image load on the Sim?

Various things to try: option-clean your project. Remove the app from the device. After you build open the bundle on your Mac to see if the file is there. You can also download the bundle from the device and see if the file is there. Can you load the image with UIImage imageNamed: ?
 

moonman239

Cancelled
Original poster
Mar 27, 2009
1,541
32
It's best not to have spaces in file names. The file system on the device is case sensitive while the file system on your Mac most likely is case insensitive. Are you using an @2x version of the file? Are you using Images.xcassets to store your images? Does the image load on the Sim?

Various things to try: option-clean your project. Remove the app from the device. After you build open the bundle on your Mac to see if the file is there. You can also download the bundle from the device and see if the file is there. Can you load the image with UIImage imageNamed: ?
Thanks for the suggestions.

I don't have a @2x version - one version for use with all devices (TBH, though, I don't believe users are exactly going to care). Also, I'm not using Images.xcassets, and I haven't tried the simulator. I removed the spaces and turned the upper-case P into a lowercase P.
 

moonman239

Cancelled
Original poster
Mar 27, 2009
1,541
32
OK, so I managed to get around this issue by setting the UIButton image programmatically.

Edit: Once again, thank you PhoneyDeveloper.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.