在 iOS 上增加自己 App 的内存使用上限

Oct 19, 2025 • 预计阅读时间 1 分钟

不管 iPhone 的内存有多大,单个 App 能够使用的内存上限总是 3GB,如果超过这个上限就会被系统杀掉。

如果 App 确实在某些情况下需要使用大量内存,那么可以在项目的 entitlements 里面添加 increased-memory-limit 来告诉 iOS 系统自己在某些情况下会需要使用更多的内存。

<key>com.apple.developer.kernel.increased-memory-limit</key>
  <true/>

Tips:iOS 系统为了当前运行的 App 能够有充足的内存,会杀掉其他 App 来释放内存。

参考资料

https://developer.apple.com/documentation/bundleresources/entitlements/com.apple.developer.kernel.increased-memory-limit

iOS
版权声明:如果转发请带上本文链接和注明来源。

lvv.me

iOS/macOS Developer

APFS 开启透明压缩