Search code examples
objective-cios4iphone-sdk-3.0xcode3.2

How can I open an Xcode project in an older version of Xcode?


I need to open an Xcode project in older Xcode version to build under the older SDK. What is deployment target option mean in "project settings". Does it mean that I can build my project on latest iOS 4.3 SDK for an iPhone OS 3 device? How about some functions in classes that dont support in older version of SDK?


Solution

  • Base SDK is the version of the iOS SDK API that your app is compiled with. This means that your app is being built with the libraries for that version of iOS. As Black Frog mentioned, you must use the latest SDK to get your app approved on the App Store.

    Deployment Target is the minimum version of iOS on which your app will allow itself to run on. (The App Store prevents older vesions of iOS from installing apps with a Deployment Target that is newer than that version.)

    If you wanted your app to use, say, Game Center (which requires iOS 4.1), and run on iOS 3.1.3 or higher, then you would use a Base SDK of 4.1 or higher and a Deployment Target of 3.1.3.

    To deal with classes and methods that don't exist, you should check if they exist before using them. Here's a great blog post on managing different versions of iOS and different versions of the SDK.

    All Xcode projects since 3.2 have had the same internal format. So, you should be able to open the Xcode project in the older Xcode. In Xcode 3, you can see the project format version in the "Get Info" of your project. (I haven't found this yet in Xcode 4.)