xdumaine
xdumaine

Reputation: 10329

Why won't my image update in an iOS control?

I have a bundle with images in it for buttons. I changed a number of these files, but all are still showing as the old image when I build and deploy to device or simulator. Is there something I can do to get the build or device to realize that these images have changed? When I view the image in Xcode, it shows the new image (same file name, but updated image). When I deploy it, it shows the old image.

Upvotes: 2

Views: 1675

Answers (5)

Ford Davis
Ford Davis

Reputation: 343

Clean is Shift+Command+K or -->product --> clean for newbs like me who didn't know what clean was.

Upvotes: 0

Dancreek
Dancreek

Reputation: 9544

2 things that typically solve the problem:

  1. Do a "Clean"
  2. Delete the app from the device/simulator

Upvotes: 0

Herwr
Herwr

Reputation: 494

Check in your Xcode project settings 'Build Phases' / 'Copy Bundle Resources' to make sure the images 'you think' (the updated ones), are included in the bundle and not an old reference.

Failing that have you tried a 'Clean & Build', or delete the App from the device / simulator and re-build it.

Upvotes: 0

user207128
user207128

Reputation:

Try to remove derived data which is located here: ~/Library/Developer/Xcode/DerivedData/<YourAppName>-<some_hash>

Upvotes: 0

Shaggy Frog
Shaggy Frog

Reputation: 27601

Sometimes Xcode has caching issues with build artifacts. Try doing a clean first, then build.

Upvotes: 10

Related Questions