Xcode — delete images are still getting built when building app

廉价感情. 提交于 2019-12-06 08:12:55

问题


I am trying to clean up my app before I submit it for apple approval, but I have an issue. I have delete some unwanted background images but the app seems to think they are still there. I have delete the app completely from the phone but when I build it is still there. The image has been completely remove from the Mac it doesn't exist anywhere not even in the simulator folder

/Users/******/Library/Application Support/iPhone Simulator/5.0/*********/appname.app

I can't seem to figure out whats going wrong.

I have had a look at a few questions like

Xcode- Deleted images appear in simulator

but this doesn't work, I have also tried

Attempting to delete an image from Xcode 4

when it builds it just adds it back in.

Can anyone help? or advice where I can find some help?


回答1:


Delete it and then, from Xcode, perform that:

  1. Press Shift+Cmd+K
  2. Alt+Shift+Cmd+K

It will empty your cache and clean your build folder.




回答2:


Product -> Clean or ⌘-Shift-K.




回答3:


In the project tree click the name of the project name, select targets and build phases tab. There will be a section named "copy bundle resources", if you can see the name of your file, delete it from there. Then follow others' solution to clear the cache and make a clean build.

Edit: Also check Xcode- Deleted images appear in simulator, I guess your question is answered there.




回答4:


Have you tried cleaning your project and then building it again ? (It might still used the already built .app file when you uploaded it again to your phone)




回答5:


i think thats happens because of you are deleting the reference of images so that images are still in the folder of your project so do these 3 things. 1. go to your project folder where it is saved and search those images and if you found those images in that folder than delete them. 2. clean your project. from product->clean 3. delete app from simulator after that try again i think your problem is resolved.



来源:https://stackoverflow.com/questions/9566065/xcode-delete-images-are-still-getting-built-when-building-app

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!