简体   繁体   English

适用于通用应用的iOS部署目标

[英]iOS Deployment Target for Universal App

Good morning, stackoverflow folks. 大家早上好。

I'm having a small problem, and I can't find a solid answer via google, stackoverflow, or from the Apple documentation. 我遇到了一个小问题,我无法通过google,stackoverflow或Apple文档找到可靠的答案。 Perhaps I am not searching for the right keywords. 也许我不是在寻找合适的关键词。 Anywho, on with my simple, stupid question(s): 任何人,伴随着我一个简单而愚蠢的问题:

I'm currently developing a universal app. 我目前正在开发通用应用程序。 I'd like for the iOS Deployment Target to be set for 3.2+ for the iPad, and 4.0+ for iPhone/iPod Touch , yet there is only one field for the setting. 我想将iOS部署目标设置为iPad为3.2+,iPhone / iPod Touch设置为4.0+ ,但设置只有一个字段。 Should I be setting this value to 3.2 or 4.0? 我应该将此值设置为3.2或4.0吗? Isn't 3.2 an iPad-only SDK? 3.2不是仅iPad的SDK吗? Does this value need to be set in both the Project Build Settings and the Target Build Settings? 是否需要这个值在这两个项目构建设置和目标构建设置进行设置?

Please note: I'm using 'Latest iOS (currently set to 4.2)' as the Base SDK, and after reading the following, I still can't derive a definitive answer: 请注意:我使用'最新iOS(目前设置为4.2)'作为基本SDK,在阅读以下内容后,我仍然无法得出明确的答案:

http://developer.apple.com/library/ios/#documentation/DeveloperTools/Conceptual/cross_development/Configuring/configuring.html http://developer.apple.com/library/ios/#documentation/DeveloperTools/Conceptual/cross_development/Configuring/configuring.html

Any help in the matter would be greatly appreciated.Thanks! 在这方面的任何帮助将不胜感激。谢谢!

You should set Base SDK to the latest, and set Deployment Target to 3.2. 您应该将Base SDK设置为最新版本,并将Deployment Target设置为3.2。 THEN ––and this is important––if you use any API that is available ONLY in 4.0 or later (that is, NOT in 3.2), then you must do a runtime check to see if that API is actually available, and if not, do something else. 然后 - 这很重要 - 如果您使用任何仅在4.0或更高版本中可用的API(即3.2中不是),那么您必须进行运行时检查以查看该API是否实际可用,如果不可用,做其他事情。

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

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