I'd like to use some features of iPhone OS 3.0 in my 2.0 app when it runs on a 3.0 device. I don't want to go 3.0 all the way because there are customers who do not want to update yet.
I experimented a bit with weak linking of the MapKit.framework (-weak_framework MapKit). I found it quite cumbersome, since I had to trick the compiler/linker to use the 2.0 SDK with all code except the one which uses MapKit.
Has anybody more experience with this? What are you doing to make it compile/link. Has anybody already submitted an app to Apple, which weak-links frameworks from other OS versions?
Apple has an example of how to do this, specifically making a 2.x-compatible app that uses MFMailComposeViewController....
http://developer.apple.com/iphone/library/samplecode/MailComposer/index.html
the answer involves compiling with the 3.0 SDK, setting the deployment target to 2.x, ensuring that the 3.0 frameworks are marked as "weak" references, and then doing the right thing to make your code work if you're on a device where the new frameworks aren't present.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With