eroy4u
eroy4u

Reputation: 179

Can I use Xcode 3.1 to develop app for iOS version 4.0, 4.3 and 5

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?

Upvotes: 1

Views: 1275

Answers (5)

Gabe Rainbow
Gabe Rainbow

Reputation: 3738

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.

Upvotes: 0

hotpaw2
hotpaw2

Reputation: 70663

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.

Upvotes: 0

X Slash
X Slash

Reputation: 4131

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

Upvotes: 1

Novarg
Novarg

Reputation: 7440

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

Upvotes: 0

Oscar Gomez
Oscar Gomez

Reputation: 18488

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.

Upvotes: 4

Related Questions