简体   繁体   English

即使我从捆绑软件中删除了图像,为什么Xcode仍会将图像复制到设备上?

[英]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. 同样,不带图片的捆绑包大小为20Mb,带图片的捆绑包大小约为400Mb,存档大小也是如此。 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. 我可以确认,现在存档我的应​​用程序时,它的大小是预期的20Mb,但是当我将其安装在我的设备上时,它占用了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 Command-shift-k =清除目标
  2. Command-option-shift-k = empty caches and clean all targets Command-option-shift-k =清空缓存并清理所有目标
  3. Delete app from the device 从设备上删除应用
  4. Restart Xcode 重新启动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. 这可能对您有用。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 即使我添加了约束,这些约束也没有出现在Xcode 6.3中 - Constraints not showing up in Xcode 6.3 even though I added them iOS Xcode:我是否需要在xcode捆绑包中保留所有初始屏幕和应用程序图标图像的两个副本? - iOS Xcode: Do I need to keep two copies of all the splash screen and app icon images inside xcode bundle? 即使从供应配置文件中删除了UDID,iOS应用仍在安装到设备中 - iOS app is still installing into device even after UDID removed from the provisioning profile 即使XCode,Xamarin Studio也无法识别iOS设备 - Xamarin Studio does not recognize iOS device even though XCode does 为什么我的应用程序仍然冻结,即使我使用Alamofire提出请求? - why my app still freezing even though I use Alamofire to make a request? Xcode 错误:即使设备未被密码锁定,_shouldMakeReadyForDevelopment 检查也失败 - Xcode Error: Failed _shouldMakeReadyForDevelopment check even though device is not locked by passcode 即使我在NSDateFormatter上设置了时区,为什么stringFromDate NSString仍然具有GMT时间? - Why does stringFromDate NSString still have GMT time even though I set timezone on the NSDateFormatter? 为什么我的 Xcode 编译器告诉我我使用的是值类型,即使我使用的是类? - Why does my Xcode compiler tell me I use a value type even though I use classes? 每次编译项目时,Xcode都会复制图像。 - Xcode copies images everytime I compile my project. 即使我从数据源中删除了一行并重新加载了表格,tableView仍然显示两行 - tableView still shows two rows even though I deleted one from the data source and reloaded the table
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM