Image does not refresh when file name remains unchanged in Xcode 3.1.2

I am using Xcode version 3.1.2 and developing for iPhone using Simulator with iOS 2.2.1 on Leopard. I had an image file named "img.jpg" in my project, which I decided to switch for another file. After adding a new file to the Xcode Resources folder, I deleted the first file and renamed the new file to the same name as the previous one, "img.jpg". However, when I run my program, the simulator loads the old image instead of the new one, although the old one was deleted from the disk (and not just with the link). I tried changing the file name to "img2.jpg" and it worked as it should - loading a new image, but I want to keep the name "img.jpg". I ran a search using Spotlight for "img.jpg" to find out if there is another copy stored somewhere in Xcode,but she only returned my new image file. I tried to remove the application from Simulator and run the application again, but this also does not fix the problem.

What should I do for Xcode to find out that I want to use the new image file, not the old one?

Thanks for the help!

+3
source share
5 answers

You must clear all your target Xcode projects using "Build" → "Clear All Goals" and rebuild from scratch. This should solve your problem.

+5
source

If you have a large project and you do not want to wait long, you can also delete and re-add the link to the file from / to your project. It seems like it always works.

+1
source

, :

  • Xcode

    >

  • -, . , ( ).

+1

Xcode 4. ~ iphone.png, . ~ iphone.png . , Default ~ iphone.png iphone, xcode , Default.png.

0

- Simulator Simulator

The folder should be called something like / Users / username / Library / Application support / iPhone Simulator / 6.1 / Applications / 53630E9A-6E04-4D33-8600-AD29484C9FA8 and enter YourAppName.app inside

0
source

Source: https://habr.com/ru/post/1761006/


All Articles