iPhone与SDK不同版本兼容性问题

发布于 2024-12-02 13:46:45 字数 298 浏览 2 评论 0原文

我是一名初级 Apple 开发人员,我有一些问题想要解决。

首先,我目前正在使用 Xcode 3.2.6,因为我还没有注册开发人员计划。我想知道 Apple 是否只接受在 SDK 4 上编译的应用程序(对于 App Strore)。 其次,我希望我的应用程序能够在 iPhone 3 和 4 上运行。您建议我做什么?我在几个开发者论坛上读到,为了实现这一目标,我必须以 3.1 iOS 作为目标来构建我的应用程序。这是正确的吗? 最后,iPhone 3和iPhone 4之间的分辨率差异是否会带来问题呢?您认为我应该使用哪种分辨率?

先感谢您, 樱桃

I am a beginner Apple developer and I have some issues I would like to resolve.

First of all, I am curently working on Xcode 3.2.6 because I haven't enrolled for the developer program yet. I would like to know if Apple only accepts apps (for the App Strore) compiled on SDK 4.
Secondly, I want my apps to work both on iPhone 3 and 4. What would you advice me to do? I have read in several developer forums that in order to achieve this I have to build my application with 3.1 iOS as a target. Is this correct?
Finally, is there any problem due to the difference in resolution between iPhone 3 and iPhone 4? Which resolution do you think I should use?

Thank you in advance,
Cherry

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

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

PS 我建议您避免支持 iOS 3.2 或更早版本。 iOS 4 引入了许多不错且有用的功能。我非常确定,Apple 将在 iOS 5 发布后不久取消对 iOS 3.x 的支持。

  • Set Base SDK to latest (4.3).
  • Set Target SDK to 3.1.
  • Avoid features available only in iOS 3.2 or later (e.g., don't use blocks, don't frameworks introduced in iOS 3.2 or later, always check availability of methods). Later, when you get more experience with Objective-C, you may try to combine features of more modern iOS, but still keep compatibility with older iOSes.
  • Don't worry about resolution. It affects only images – if you want to take full advantage of Retina display, then you will need to create images for both resolutions (std. and hi-res).

P.S. I suggest you to avoid support for iOS 3.2 or earlier. iOS 4 introduces a lot of nice and helpful features. And I pretty sure, Apple will revoke support for iOS 3.x soon after iOS 5 release.

沫尐诺 2024-12-09 13:46:45

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

这是苹果公司的声明。

以最新的 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.`

以早期的 iO​​S 版本为目标。

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 个月,我确信苹果会发布 iOS 6(他们的更新速度非常快),而且我个人认为,从长远来看,瞄准 iOS 3 不会给你带来很好的结果。

If you are aiming for iOS 3, you will end up not using the features of iOS 4, which is the majority.

This is Apple's statement.

Target the latest iOS release.

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.`

Target an earlier iOS release.

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.`

But I would suggest that you target the iOS 4 as people are now targeting iOS 5, and in another 8 months, I am sure Apple would release iOS 6 (They are very quick with their updates), and I personally feel that targeting iOS 3 is not going to give you great results in the long run.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文