1

I have app-specific data files in my app Resources directory, and they are included in the "Copy Bundle Resources" list. They were always copied in the app bundle when I ran my app in either the simulator or on a device. (The app was initially created in XCode 4 / iOS 5: now on XCode 6 /iOS 8.2.) Recently I removed some of these files and added newer versions with different names. I expected when I next ran my app in the simulator or on my device, I would get the new data files. However, when I run the app in the simulator or on a device, I still see the old files.

I have done a Clean/Rebuild in XCode, and I have deleted my app in the simulator and on my device - multiple times. I made sure the old files were no longer in any of my app folders. I assumed that XCode had these files in a cache somewhere, so I searched in Terminal and did find my app in /users/jwanner/Library/Developer/CoreSimulator/Devices//data/Containers/Bundle/Application/. The app in these folders (there were several instances of the first guid) sometimes had the old files. I copied these to trash, and now my app installs with none of my data files - not the old files and not the new files.

I have searched Google for hours and can't find a solution to this problem. Obviously I am missing something vital here. Should I list my data files in my -Info.plist somewhere? Is there a way to clear out old bundles and have XCode cache new ones?

rmaddy
  • 314,917
  • 42
  • 532
  • 579
Jim Wanner
  • 11
  • 3
  • Follow the instructions I give here: http://stackoverflow.com/questions/5714372/how-to-empty-caches-and-clean-all-targets-xcode-4/6247073#6247073 – matt Mar 28 '15 at 17:32
  • First clean the project. Then delete the app in the simulator. Then bring up Window / Organizer and click on Projects. Delete the derived data for the project. Then file a bug with Apple. – EricS Mar 28 '15 at 17:33
  • Thanks @ErikS - I didn't know about the Delete derived data button in Organizer/Projects. Unfortunately, that didn't fix the problem. Time to file a bug with Apple. – Jim Wanner Mar 28 '15 at 19:02
  • Thanks for the link, @matt. I did close XCode, reset the simulator, deleted everything in .../Library/Developer/XCode/DerivedData, cleaned/built the app: didn't change anything. – Jim Wanner Mar 28 '15 at 19:10
  • I assure you that if you cleaned all caches as I described, what you see when you build and run is what is actually in the project. If there is still a problem, it is in the project as it stands. – matt Mar 28 '15 at 19:20
  • You are correct, matt: if I remember to reset the simulator, then I get the new bundle after cleaning the caches. Thanks much. – Jim Wanner Mar 28 '15 at 21:55

0 Answers0