XCode iOS simulator is case insnsitive. iOS on Device is not.

We have an iPad app. We load images using file paths into the app. Images appear just fine in the iOS simulator. Images do not show up on the device. Fist shaken madly in the air, agony.

Thanks to my colleague Dolphy Fernandes we managed to discover the culprit. The iOS Simulator used by XCode loads file in a case insensitive manner. To it, a file called A55.jpg and a55.jpg are the same. iOS on devices, on the other hand, is case sensitive. Hence, A55.jpg will not load if the file name you are attempting to load is 'a55.jpg'.

Hope it helps…

Tags: , , , , , ,

1 comment

  1. That's not entirely true.  Xcode doesn't load files.  The OS loads files, and it does so in a case-sensitive or case-insensitive manner, depending on where they're stored.  That's why Apple recommends that you use a case-sensitive volume when building apps for iOS.
    The easiest way to do this is to use a case-sensitive root volume on your build machine, but you can also do this by making ~/Library/Application Support/iPhone Simulator be a symbolic link to a case-sensitive disk, partition, or mounted disk image.
    Hope that helps.

Leave a Reply

Your email address will not be published. Required fields are marked *