tags:

views:

684

answers:

5

Hi! I would like my app to be compatible with iOS 2.0 as with iOS 3.0 and iOS 4.0.

I'm going to use SQLite for many reasons.

Now: what should I do with SQLite? Should I use the features available with the SQLite shipped with iOS 2.0 only?

All the best

+1  A: 

iOS 2.0 isn't supported with recent SDKs directly any more. Targeting iOS 3.x can be done but Apple says you should use the most current SDK each time you submit an app and if the most recent doesn't have support for building 2.x apps you probably shouldn't use it. They have also depreciated some things in 3.x from 2.x and by 4.x you don't have guarantees that it is still available.

jamone
A: 

To add to what Jamone said which is correct. the libsqlite3.dylib hasn't changed as I have used and tested it in iOS3 and iOS4 with no changes. I have no idea from iOS 2 to iOS 3. I think you will find it extremely hard to get a single App working in all 3 OS's or at the very least a limited app as you would be restricted to functionality available in iOS 2

Rudiger
A: 

Thank for your answers,

In Xcode 3.2.3 I'm able to set the base SDK to iOS 4.0

SDKROOT = iphoneos4.0

and the deployment target to iOS 2.0

IPHONEOS_DEPLOYMENT_TARGET = 2.0

I understand that iOS 2.x is no more directly supported, but that doesn't mean you cannot be backward compatible... As Rudiger pointed out, it will be a pain in the ass to develop an application so backward compatible. But do you really think there are no more iOS 2.x iPod Touches around?

Anyway, thank you for the infos about libsqlite3.dylib, I was stuck with SQLite since foreign key support has been introduced in the october 2009 upgrade (http://www.sqlite.org/changes.html), and so it will not be available in iOS 2.x and 3.x devices...right?

Giova
A: 

I personally haven't changed the SQL code in one of my apps which has been originally developed for 2.0 and is now pending in the App Store, built against the 4.0 SDK (but deployment target set to 3.0). So I'd say that you don't have to worry about SQLite between these versions, unless you knowingly use some SQLite feature that has not been present on 2.0

You can find some interesting usage stats from AdMob: http://metrics.admob.com/. I can't find the specific link right now; last time I checked (March 2010), devices running iOS < 3.0 were just below 5%. So whether it's worth to still target that family is up to you; I for myself have ditched support for < 3.0.

Pascal
+1  A: 

SQLite 3 version numbers from sqlite3.h:

3.4.0 - iPhone OS 2.2.1
3.6.12 - iPhone OS 3.0 / 3.1
3.6.22 - iPhone OS 4.0

Matt