iPhone和SDK不同的版本兼容性问题

时间:2011-09-03 16:55:59

标签: iphone xcode sdk compatibility resolution

我是初学Apple开发人员,我有一些我想解决的问题。

首先,我正在努力研究Xcode 3.2.6,因为我尚未注册开发者计划。我想知道Apple是否只接受在SDK 4上编译的应用程序(针对App Strore)。 其次,我希望我的应用程序能够在iPhone 3和4上运行。您建议我做什么?我在几个开发者论坛中读过,为了实现这一点,我必须用3.1 iOS作为目标来构建我的应用程序。它是否正确? 最后,由于iPhone 3和iPhone 4之间的分辨率不同,有什么问题吗?您认为我应该使用哪种解决方案?

提前谢谢你, 樱桃

2 个答案:

答案 0 :(得分:2)

  • 将Base SDK设置为最新版(4.3)。
  • 将Target SDK设置为3.1。
  • 避免仅在iOS 3.2或更高版本中可用的功能(例如,不使用块,不要在iOS 3.2或更高版本中引入框架,始终检查方法的可用性)。之后,当您获得更多使用Objective-C的经验时,您可能会尝试结合更现代iOS的功能,但仍然保持与旧版iOS的兼容性。
  • 不要担心解决方案。它只影响图像 - 如果你想充分利用Retina显示,那么你需要为两种分辨率(标准和高分辨率)创建图像。

P.S。我建议你不要支持iOS 3.2或更早版本。 iOS 4引入了许多不错且有用的功能。而且我很确定,Apple将在iOS 5发布后很快撤销对iOS 3.x的支持。

答案 1 :(得分:1)

如果你的目标是iOS 3,你最终将不会使用iOS 4的功能,而iOS 4的功能占大多数。

这是Apple的声明。

定位最新的iOS版本。

Targeting the latest release allows you to take advantage of all the features 
available in the latest version of iOS. However, this approach may offer a smaller 
set of users capable of installing your application on their devices because your     
application cannot run on iOS releases that are earlier than the target release.`

定位早期版本的iOS。

Targeting an earlier release lets you publish your application to a larger set of 
users (because your application runs on the target OS release and later releases), 
but may limit the iOS features your application can use.`

但我建议您定位iOS 4,因为人们现在正在瞄准iOS 5,而在另外8个月内,我相信Apple会发布iOS 6(他们的更新非常快),我个人觉得从长远来看,定位iOS 3不会给你带来很好的效果。

相关问题