Deleted file remains in NSBundle
I recently deleted a file within Xcode. After I deleted this file I cleaned up the project (Shift+cmd+K). For one or other reason the system shows the warning after the cleaning process has been finished successfully:
no rule to process file '$(PROJECT_DIR)/json2.js' of type sourcecode.javascript for architecture i386
But this is not the deleted file since I deleted 1231345.jpg
I use the following code to开发者_开发问答 check if the path exists
if([[NSBundle mainBundle] pathForResource:@"1231345" ofType:@"jpg"] == NULL)
{
//Here some code if the image doesn't exist
} else {
//Here some code if the image does exist
}
If I manually change the 'pathForResource' to a random number which hasn't been a previous file everything works fine!
Whats going wrong here?
Have you deleted the app in the simulator/device? If you deploy via XCode, old files are not deleted, but if you build & archive and then install the archive it usually works.
精彩评论