Automatic Reference Counting on iOS 3.x

萝らか妹 提交于 2019-12-24 04:35:17

问题


Does an app compiled with arc turned on work with iOS 3.1.x devices? Ideally I would like to make our app work only with iOS 4.x and higher but we have some users still running iOS 3.x. I no longer have access to devices with iOS 3.

Has anyone tested?


回答1:


I wouldn't count on ARC working back to iOS 3.x until you've at least found official documentation to that effect and perhaps tested it yourself as well. Here's at least one opinion that supports the notion that apps written using ARC may not even work on all versions of iOS 4.




回答2:


ARC is only available on iOS 4.0 and above. Additionally automatic real reference nil-ing is only available on iOS 5.0 and above.




回答3:


If you set the deployment target to pre 5.0 the compiler will automatically insert the memory management (retain/release) for you. So yes, it will work.



来源:https://stackoverflow.com/questions/7706889/automatic-reference-counting-on-ios-3-x

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!