If I install the 3.0 SDK, can I still make 2.0 compatible apps? - iphone

I've been putting off installing the 3.0 beta SDK in case I can't make apps to target 2.0. If I install 3.0 on my computer and iPhone, will I still be able to submit apps to the app store for users with 2.0 iPhones to download? Will I have to wait until 3.0 is released to submit more apps?

Actually, I suggest testing on OS 3.0 as it's a requirement your app doesn't break on the new OS.
"New iPhone applications will be
rejected unless they are ready for
Apple's forthcoming iPhone 3.0
firmware upgrade, developers have been
informed."
You can still build for 2.* but I can see how testing on only one device can make you nervous. There is no way to rollback to a previous OS once 3.0 has been installed. So, if this device is also your everyday cell phone, make sure you accept possible bugs. (though I haven't heard of any seriuous problems. OS 3.0 is worth it)
As for the issue you address. Apple says:
"iPhone SDK for iPhone 3.0 can not be
used for submitting iPhone OS 2.2.1
applications to the App Store."
I think they didn't express themselves too well. While technically spoken, they are right, you just have to select SDK for 2.2.1, and you're good to go.

Yes you can build 2.* apps. No you can't submit pre 3.0 apps to the app store. I can't paste the link for you since I am considered a new user, so just google "iPhone 3.0 app submit".

I understand that you wrote this a while ago and you've already accepted an answer, but I have some more advice:
You should install two copies of the SDK, the latest stable version (in "/Developer") and the latest beta version (in "/Developer Beta" or similar), as per these instructions.
For building 2.x applications, you set your "Base SDK" to 3.0 and your "iPhone OS Deployment Target" to 2.2.1, as per these instructions.

You can get it free or roll back if you do not like the new software at http://www.felixbruns.de/iPod/firmware/
download then follow these steps
1.) after it downloads open itunes and plugin your ipod/iphone
2.) Hold shift if on windows (Option key on mac) and then click resotre
3.) Select the ipod file and then wait for restore
4.) you will need to set up as new ipod (it will be slow if you restore from backup

The installation of the 3.0 SDK mentions weaklinked frameworks --
The Xcode UI now allows you to
designate a library or framework as
weaklinked, to support building with
newer SDKs while targeting older OS
versions.
I have yet to accomplish this, but will update once figured out.

Related

iPhone app submission software requirements

I wanted to understand the things involved in iPhone app submission in terms of software requirements (not the steps to submit it on Apple iTunes Connect)
When we download the IOS SDK, is XCode included in that ? If yes, what are the latest versions and approx size of them?
When we develop the app and are ready to submit (say as of today), is it necassary to have a particluar (or rather the latest) version of IOS SDK or XCode installed on our system ?
Are there any specific OS X requirements (I mean if Snow Leopard and above is fine) ?
Everything is detailed on the iOS Dev Center (you may need to log in to have the details):
When you download Xcode (or more precisely the "Developer Tools" package), it includes Xcode and a lot of other tools (Instruments, gcc, gdb, llvm, lldb, the iOS Simulator, ...) and also the latest version of the MacOS and iOS SDKs too.
The version and size are mentionned on the download page too (version of Xcode, of the iOS SDK, of the Mac SDK,... everything). Right now (oct. '11) it is Xcode 4.2, iOS 5.0 SDK and OSX 10.7 SDK. Everything come in one package (1.65Go for the latest version as of today) except the documentation, which is downloaded automatically by Xcode itself (unless disabled) in the background.
For the requirements, it is also described in the iOS Dev Center: Xcode4 is available for both Snow Leopard (on the iOS Dev Center) and Lion (via the Mac AppStore) right now.
When you submit your app, you normally should always submit it using the latest SDK (1). [EDIT after #progrmr comment] except of course for beta versions of the SDK. Alsways submit with the latest "release"/public SDK version]
Note that using the latest SDK does not mean that you need to stop supporting and testing for previous iOS versions. You can use the iOS 5.0 SDK and publish an app that is running on iOS4.x for example (and of course it is better if it still works on iOS5.x too); ascendant compatibility is generally guaranteed, unless specified for specific methods (see the "SDK Compatibility Programming Guide" in the Apple Doc for more info).
(1) It is generally accepted if you submit with the SDK version just before the latest if it is not too old, Apple let you some time to migrate, but this is generally just a transition phase. It is advised and a good practice to migrate to the latest SDK when it is available -- or not too late after that.
XCode 4.2 is about 1.8gb, and that doesn't include documentation - when you first load XCode it tries to download something like 2-2.5gb of docs in the background. You have to both cancel the download and the auto update check to avoid that (but auto updating docs is cool).
I don't recall any requirement to use the latest and greatest, you can still download XCode 3 with iOS SDK 4.3 from the archives. But I can't say for sure, I always run the latest (I find upgrading to new XCode releases is generally a good idea).
XCode is available for Snow Leopard once you buy the $99/yr iOS developer subscription, the mac app store has it but only for Lion. The advantage of the MAS version is you can play with the SDK and making basic apps for free, just not run code on your iOS device.

when deploying an iOS app for an older SDK, how to test it?

I have written an app and its base SDK is set to 4.2, and at the moment it is in the app store with a deployment target set to 4.2, I'm sure you'll agree this is a bad idea because I am alienating all potential users who do not have the latest version of iOS installed.
So my question is, when deploying for an older version of iOS, how do I make sure it will run, i.e. how do I check whether I've used any modern API's that are not present in the deployment target iOS version?
The only sure-fire way to make sure your app will run is to test on a device running the older OS version you specify.
Even old versions of the iPhone Simulator (if you can find such) will not do a good job of checking for compatibility.
Most developers who want to support customers on iPhoneOS 3.x have access to an old test device, such as an used iPod Touch (hand-me-down, or purchased on eBay, etc.) running the OS version set in the app's Deployment Target. Otherwise, the developer is just guessing/gambling.
Check the documentation of the libraries or methods you are using. Test on the actually device installed with the version of the OS you wish to support.
Change the Base sdk version to 4.2, target sdk to 3.0 or any.
test the app in simulator as the target as simulator 3.0 r any.
But, when compared to 3.2 , 4.2 version has many new functionalities that do not work on 3.2 version devices.
So take respective steps to do for 3.2 r for 4.2.
The better idea is to find the version of the device , then give the accessibility based on the version.
Thanks,
Bharath

Which iPhone SDK to use for compatibility

i'm writing my first iPhone app with aim to upload it to the AppStore and don't understand one thing:
Most popular games on the AppStore have compatibility with iPhone OS 3.0 or later. I have currently installed iPhone SDK 4.0 i believe.
I want my app to have the same compatibility starting from 3.0, do i have to install and use in development an earlier SDK, like 3.0 to achieve that goal or i can somehow use the latest SDK?
Thanks for any help!
You should always build against the most current SDK, that is 4.1 at the moment. You can set your minimum requirement differently though, i.e. 3.0.
To be able to upload your application to appstore you must build it using SDK 4.0 at least.
Then in build target settings you can specify minimum OS version your application can be run on - check "iPhone OS Deployment Target" setting.
Remember that if you use some APIs that are available not on all OS versions you support you should do run-time checks for them to avoid application crashes.

Simulate iPhone 3.0 with SDK 4.0

i have xcode 3.1.3 and xcode 3.2.1 installed
For sure now I use 3.2.1 with Sdk 4 to develop new apps.
But what if I like to test a App compiled with sdk 4 on a
simulated iphone that would just have 3.0??
As BaseSDk i use 4.0 and as target 3.0
In xcode 3.1.3 i could select a simulator down to 2.x but with sdk 4.0
i only have the option 4.0 iphone or 3.2 ipad
Example> i know iAd is not supported before 4.0 so I set the
framework to weak. But just to be sure all works fine I really
would like to test my app in a simulator that simulates an iphone with 3.0
thx
chris
The new simulator does not seem to be able to run the old simulator OSs (3.2 being the oldest it'll run). I tried moving them over from old SDK installs and several variations and "no go".
You can check that you aren't using methods defined in the new SDK, when you set the base SDK to 4.0 but set the Deployment to to 3.1.3, for example. For a blog post on how to do this see this blog post, and note my comment on an easier way to do the last two steps (no need to edit the project file as a text file).
inside the iphone sdk dmg file, there should be a folder called packages. in it, you'll find packages like iPhoneSDK3_0 and iPhoneSimulator3_0. Install them to be able to use them in xcode.
Correct me if I'm wrong, but I think a device with 3.0 installed can't even run apps compiled with 3.2 or 4.0. Furthermore, Apple now only accepts iPhone apps (including updates of existing apps) linked against the 4.0 libraries, which won't run on OS version 3.0 devices.
So why do you want to test your app on a 3.0 device?
Try setting the architecture you want to build for in the Xcode project preferences and rebuilding.
If this doesn't work, completely uninstall Xcode and downgrade. You have to completely uninstall because your system must have updated the frameworks for 4.0.
Hope this helps

How to get iPhone SDK 2.2.1 for Xcode 3.2?

After my upgrade to Snow Leopard and Xcode 3.2 (which I really regret a lot!!), Xcode lost all the SDK's. I'm one of those old-fashioned idiots who still want to develop for 2.2.1. But Apple does not offer me an old SDK download.
Now I was clever and made tons of time machine backups. But: What's the preferred way to get iPhone SDK 2.2.1 running with Xcode 3.2? Some guys said that's generally possible. I do hope so because I still don't believe in all those "faked" stats, and besided that, my app doesn't benefit from 3.x additional features so I would not want to constrain my market just for that lazyness.
Any idea?
Regardless of whether or not you're targeting iPhone OS 3.0 or not using any 3.0 specific features, you should always compile your app against the latest SDKs to benefit from bug fixes and performance improvements.
You can compile against the 3.0 SDK and set the iPhone OS Deployment Target to 2.2.1 and still cater for users who are using 2.2.1.
You may find that some methods have been deprecated, but that doesn't stop you from using them until you're ready to move on.
Get the 3.1 final sdk, it has the 2.2.1 sdk in it. On disk its usual location is:
/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS2.2.1.sdk
Also included is 3.0 and 3.1.
XCode 3.2 should have the prior iPhone SDKs available, just make sure you are setting your project's Base SDK setting to "iPhone OS 2.2.1". (Right-click on your top-level project icon in the Groups & Files browser in XCode and choose "Get Info", then go to the Build tab.)
Raffaello and others are correct: you can use the latest SDK and still target (and test on) older SDKs. For example, I'm using iOS4.0 (xcode 3.2.3) and testing on my iPhone 3g running 3.1.3.
To clarify the procedure:
- go to project info > build tab
- set Architectures:Base SDK (most likely) the latest
- set Deployment:iPhone OS Deployment Target to what ever you want (I have the option to go as far back as 2.0).
Hope this helps someone.
Like I said on other threads, the SDK and Deployment Target are different.
You can still use the latest SDK to build for an older OS.
Just go to your Target settings and under the Deployment section set the iPhone OS Deployment Target to whatever you'd like.
Cheers,
Raffaello Colasante