views:

47

answers:

2

Hello, 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!

+1  A: 

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.

Vladimir
So when developing your app you either have to never use any SDK4.0 specific methods/classes etc or provide different implementations for each version :)
willcodejavaforfood
or you can disable/enable some functionalities depending on their availability on current OS
Vladimir
Thanks for the explanation! The last question: what's the best way to check the compatibility with 3.0 (for example i'm using libxml2 now and not sure about its target sdk)?
Anton Fedoruk
I believe libxml2 is available on all platforms. In general you should not check for compatibility with specific platform but check if a class (try to create class instance from its name and check if it is nil or not) or method exist (using respondsToSelector method)
Vladimir
+2  A: 

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.

Eiko