views:

64

answers:

1

I am using the iPhone 4.0 SDK for my development and the NSXMLParserDelegate protocol in my code. I am planning to make this work on 3.1 as well by making the deployment target 3.1 and base SDK 4.0.

Since NSXMLParserDelegate is only on 4.0 and above will it work on iPhone 3.1?

Even if it works will Apple reject the app?

+1  A: 

No, you can use APIs from later versions of the OS in builds for older versions, so long as you properly handle running on the older OS. This code is safe.

Ben Gottlieb
The method which i am using is parseDidEndDocument. Apple doc says this . .Available in iOS 2.0 and laterAvailable as part of informal protocol prior to iOS 4.0 . .will that method work on iPhone 3.0 device ?
thndrkiss
If it's available in iOS 2.0 and later, then yes. But you should definitely TEST it on a 3.x device.
Ben Gottlieb
cool thanks ben. i will give a try.
thndrkiss
The protocol isn't really important at runtime, all it does is enforce compile-time constraints on the methods in your class. So it will run fine on earlier versions of iOS.
Mike Weller