Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Locker

macrumors 6502
Original poster
Aug 22, 2007
291
0
Staffordshire, UK
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 :)
 

PhoneyDeveloper

macrumors 68040
Sep 2, 2008
3,114
93
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

macrumors 6502a
Nov 9, 2007
733
6
Colchester, UK
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.
 

tod

macrumors regular
Oct 3, 2009
162
100
Ohio
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

macrumors 68040
Sep 2, 2008
3,114
93
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.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.