3

I am new in cocos2d and I am making a game by using cocos2d.

I import an png Image and use it as sprite. It works very well. But when I replace images by another image with same name and run it on simulator. It works very well. But when I run it on my iPhone for testing then it show old image (not replaced image). while I have deleted it already.

can anybody tell me that how will I fix it.

4
  • 1
    try to clean your project and reinstall app
    – Max
    Dec 7, 2012 at 6:20
  • you mean delete from iPhone and reinstall it. I have done it but it not works. Dec 7, 2012 at 6:21
  • shift+command+K and install now.
    – Sudhakar
    Dec 7, 2012 at 6:25
  • I clean the project by shift+ command+K and also deleted derived data from (~/Library/Developer/Xcode/DerivedData) but still got problem... Is there any other solution??? Dec 7, 2012 at 6:36

5 Answers 5

2

Change the name of the image for another one, rebuild the project: it should raise an error and clean internally all the links to the image. Rename back the image and compile. Hopefully, the iphone will show you the new image.

0

Try to clean the app from xcode and then reinstall. Let me know if it is not working.

1
  • I clean the project by shift+ command+K and also deleted derived data from (~/Library/Developer/Xcode/DerivedData) but still got problem... Is there any other solution??? Dec 7, 2012 at 6:35
0

clean project before building (press Shift+Command+K)

0

Clean project, go to project then clean.

0
  1. Make sure the old image is completely gone from inside and anywhere near your project's folder. (Basically put it in the trash and then empty it).
  2. Restart Xcode.
  3. Uninstall the app from your device.
  4. Restart your device.
  5. Clean your Xcode project like everyone else has said.
  6. Try to run your app.

Hopefully all of these (probably excessive) steps will do something for you.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.