PDA

View Full Version : iOS 3/4 Compatibility




Locker
Aug 1, 2010, 03:26 PM
I've got an app which I'm building for iOS4 (so that it automatically supports Fast App Switching), but I've got the 'iPhoneOSDeploymentTarget' set to 'iPhone OS 3.0' so that it works on 3.0 onwards.

When setting the 'iPhoneOSDeploymentTarget' it warns:

Framework APIs that are unavailable in earlier versions will be weak-linked; your code should check for null function pointers or specific system versions before calling newer APIs.

How would I go about doing the above? Reason being that I'm trying to implement the MFMessageComposeViewController for sending in-app SMS and whilst it works fine on an iOS4 device it falls over with my 3G running iPhone OS 3. This is the error it's retuning:

dyld: Symbol not found: _OBJC_CLASS_$_MFMessageComposeViewController
Referenced from: /var/mobile/Applications/04E3B207-A6CE-451B-9EF5-31D2CACF8DE8/GPS Info.app/GPS Info
Expected in: /System/Library/Frameworks/MessageUI.framework/MessageUI

Any help would be greatly appreciated :)



dejo
Aug 1, 2010, 04:51 PM
Did you weak-link the MessageUI framework?

PhoneyDeveloper
Aug 1, 2010, 08:16 PM
I recommend that unless you have a strong reason for doing so and some experience doing so that you not try to support any OS older than 3.2 for new code.

It's a free upgrade from OS 3.0 to 4.0. Any user that won't upgrade also won't buy your app.

It's a lot of extra effort during development and testing to support older OSes as well.

If you really really want to support something older than 3.2 then make it 3.1.3. Supporting more than that for a new app doesn't make any sense to me.

Luke Redpath
Aug 2, 2010, 09:08 AM
I recommend that unless you have a strong reason for doing so and some experience doing so that you not try to support any OS older than 3.2 for new code.

It's a free upgrade from OS 3.0 to 4.0. Any user that won't upgrade also won't buy your app.

It's a lot of extra effort during development and testing to support older OSes as well.

If you really really want to support something older than 3.2 then make it 3.1.3. Supporting more than that for a new app doesn't make any sense to me.

Normally I would agree but with iOS4 running like a dog in an iPhone 3G there is a perfectly valid reason why many people will not be upgrading any time soon. Dropping 3.x support is not as much of a no brainer as dripping 2.x support was.

Locker
Aug 2, 2010, 12:01 PM
Did you weak-link the MessageUI framework?
Aha, the framework wasn't weak linked - that solved it! Thanks :)

tod
Aug 2, 2010, 06:15 PM
Normally I would agree but with iOS4 running like a dog in an iPhone 3G there is a perfectly valid reason why many people will not be upgrading any time soon. Dropping 3.x support is not as much of a no brainer as dripping 2.x support was.

I'll just throw in that I still have many 3.x users of my 4.0 compatible, universal apps. Plus, I have yet to write something that actually needs 4.0 to run. So why not support 3.x for awhile, for the poor people who have devices that can't run 4.0? Pretty soon they will have no apps to choose from unless they buy a new device.

PhoneyDeveloper
Aug 2, 2010, 06:41 PM
There's a difference between keeping support in an app that was developed on 3.x and adding support for 3.x in an app that's being written using the 4.0 SDK.

Up to each developer to decide of course.

At any rate the topic of how to do this has been discussed quite a bit on this forum and ad infinitum on the Apple iPhone forum so anyone should be able to find all the info they need.