CBGrey
CBGrey

Reputation: 643

Why would XCode not include a resource in device build vs simulator

I have an issue where an image resource (Default.png) is included in a build for the simulator but is not being included when built for device. I have verified this by looking at the *.app package contents? I have also verified that the resource is selected for the active target. Any thoughts on what else I can look at to debug this?

Thanks.

Upvotes: 0

Views: 526

Answers (3)

Mage
Mage

Reputation: 21

Look the image names, the simulator builds fine if Default.png is actually default.png . But when building for device file names are case sensitive.

Upvotes: 2

Martin
Martin

Reputation: 1640

You should clean your target (Build->Clean All Targets) and try again. It seems pretty unlikely that the file encoding is wrong. Though I guess it's possible.

Upvotes: 1

Jasarien
Jasarien

Reputation: 58448

Try removing it from the project and re-adding it. I don't know why or how, but it's possible that the reference got lost somewhere. Re-adding it should rule out that possibility.

If it still isn't included after re-adding it to the project, then start to work with the assumption that there is something wrong with the file itself, perhaps its encoding, which may cause it to work on the simulator rather than the device.

Upvotes: 1

Related Questions