简体   繁体   中英

Why would Xcode still copies images to device even though I removed them from bundle?

I used to store some pictures in my app within the device, and then decided to move them onto a server. However, even though I removed them from my bundle, they are still copied onto my device when I debug my app on it.

I made sure to remove them from the "Copy Bundle Resources" build phase. Also, the bundle size without the pictures is 20Mb, and about 400Mb with them, and so is the archive size. I can confirm that when I archive my app now, it is 20Mb large as expected, but when I install it on my device, it occupies 400Mb.

I'm confused. Any idea what's going on? Thank you.

You can be sure to fix this by performing the following steps.

  1. Command-shift-k = clean targets
  2. Command-option-shift-k = empty caches and clean all targets
  3. Delete app from the device
  4. Restart Xcode

If this doesn't do it, nothing will!

Note: For best result, perform all of these steps before building to the device again.

I had this happen to me, I had to delete the app from the device and the re-build it and put it back to fix it. This may work for you.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM