我可以使用 Xcode 3.1 为 iOS 版本 4.0、4.3 和 5 开发应用程序吗

发布于 2024-12-27 23:24:53 字数 183 浏览 5 评论 0原文

我想开发一个iPhone应用程序,我只有OSX 10.5,所以我只能安装xcode 3.1,我可以分别开发iOS版本4.0、4.3和5的应用程序吗?或者我必须升级到 OSX 10.7 Lion 并安装 xcode 4.2?

更具体地说,如果我使用 xcode 3.1 并开发一个应用程序,它可以在 iphone 4 和 4S 上运行吗?

I want to develop an iphone app, I only have OSX 10.5 so I can only install xcode 3.1, can I developer App for iOS version 4.0, 4.3, and 5 respectively? Or I must upgrade to OSX 10.7 Lion and install xcode 4.2?

More specifically, if I use xcode 3.1 and develop an app, will it runs on iphone 4 and 4S?

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

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

发布评论

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

评论(5

烟酒忠诚 2025-01-03 23:24:53

据我所知,您将无法使用 XCode 3.1 为那些 iOS 版本进行开发,不幸的是,您似乎需要升级。

As far as I know you will not be able to develop for those iOS versions with XCode 3.1, looks like you will need to upgrade unfortunately.

一笑百媚生 2025-01-03 23:24:53

您需要至少升级到 Snow Leopard (10.6) 才能为 iOS 5 进行开发,因为不再支持 10.5

编辑:
简短的回答是的,它很可能能够运行,但是您错过了 iOS 4++ 中添加的许多功能,而且,您很可能无法在 iPhone 4/4S 上测试您的应用程序,不确定关于 iPhone 4,但 4S 肯定不会被你的 XCode 识别

You'll need to upgrade, at least to Snow Leopard (10.6) to be able to develop for iOS 5, as 10.5 is not longer supported

edit:
short answer yes, it will most likely be able to run, but you missed out on so many features added in iOS 4++, also, it's likely you won't be able to test your app on iPhone 4/4S, not sure about iPhone 4, but 4S surely won't get recognized by your XCode

尝蛊 2025-01-03 23:24:53

如果您为 iOS 4.0 制作应用程序,它应该适用于 iOS 4.3 和 iOS5。但是对于Xcode 4.2你不需要Lion,Snow Leopard就足够了(我听说Lion与Snow Leopard相比没有那么好)。

if you make an app for iOS 4.0 it should work with iOS 4.3 and iOS5. But for Xcode 4.2 you don't need Lion, Snow Leopard is enough(I've heard that Lion isn't that good compared to Snow Leopard).

芸娘子的小脾气 2025-01-03 23:24:53

您无法使用 Xcode 3.1 来开发使用 SDK API 或 iOS 4.3 或 5.x 的新增功能的应用程序,也无法调试在具有更高操作系统版本的设备上运行的应用程序。

您可以使用 Xcode 3.1 开发将在 iOS 4.3 或 5.x 设备上运行的应用程序,方法是使用 Ad Hoc 部署并通过 iTunes 安装应用程序。

You cannot use Xcode 3.1 to develop apps the use SDK APIs or features new to iOS 4.3 or 5.x, or to debug apps running on devices with those later OS versions.

You can use Xcode 3.1 to develop apps that will run on devices with iOS 4.3 or 5.x by using Ad Hoc deployment and installing the apps via iTunes.

百合的盛世恋 2025-01-03 23:24:53

您可以在较旧的 XCode 上开发较新的 ios。而且,这是管理路径和版本第 1 步的问题


更准确地说,XCode 是 IDE 与 SDK 的捆绑。然而,两者是分开的。我在同一台机器上有 3.2 和 4.0 xcode。一点也不麻烦。我使用较旧的 3.2 IDE,直到对 4.0 IDE 更加熟悉为止。

一种方法是围绕以下架构组织目录结构。

 /Developer_3.x.x
 /Developer_4.x.x

另一种方法是仅使用一个 /Developer,并将 SDK 和平台从一个 /Developer 复制到另一个。

/Developer/SDKs
/Developer/Platforms

*原因很简单:这些是预期的搜索路径

更清晰且稍微困难的路线是在下设置项目构建设置
项目|构建|架构

这两个设置是最顶层的两个设置。
“其他 SDK”设置 ADDITIONAL_SDK 变量。
“Base SDK”设置 SDKROOT 变量。

请参阅“使用目标 sdk 进行交叉开发”

和“交叉开发编程指南”

正如所指出的,需要注意的是优化、内存泄漏等。

步骤 2.(*ss 中的痛苦)

然后,您必须开始在代码中添加预编译器 if 语句。

#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 40000
if ( [[[ UIDevice currentDevice] systemVersiuon] floatValue] > = 4.0 ) {

    ...something available in 4.0
}
#endif

无论 XCode 的情况如何,该预编译器分支都应该支持多种设备。

You can develop for newer ios on older XCodes. And, its a matter of managing PATHS nd VERSIONS

STEP 1.
What is known as XCode is more accurately a bundle of a IDE with a SDK. Nevertheless, the two are separate. I have 3.2 and 4.0 xcodes on the same machine. no hitch at all. I used the older 3.2 IDE until the 4.0 IDE became a bit more familiar.

One way is to organize your directory structure around the following schema.

 /Developer_3.x.x
 /Developer_4.x.x

Another method is to use only one /Developer and copy the SDK and platforms from one into another.

/Developer/SDKs
/Developer/Platforms

*The reason that is easy: those are the expected search PATHS

The cleaner and slightly more difficult route is setting the Project build settings under
Project | Build | Architecture

The two settings are the two top-most ones.
"Additional SDKs" sets the ADDITIONAL_SDK variable.
"Base SDK" sets the SDKROOT variable.

See "Cross-develop using target sdk"

And "Cross-Development Programming Guide"

As pointed out, a caveat is optimizing, mem-leaking and so forth.

STEP 2. (Pain in the *ss)

Then, you will have to start peppering your code with precompiler if statements.

#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 40000
if ( [[[ UIDevice currentDevice] systemVersiuon] floatValue] > = 4.0 ) {

    ...something available in 4.0
}
#endif

This precompiler braches should be in there to support multiple devices, no matter the XCode case.

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