We are developing an iPad app for which I am trying to use sharekit http://getsharekit.com
I am getting this error if I use the Base SDK 3.2
Cannot find protocol declaration for NSXMLParserDelegate
But if I change Base SDK to 4.0 it works fine.
I think its possible to use Base SDK 4.0 when creating Universal apps.
Does anyone knows if apple accepts iPad only apps compiled with Base SDK as 4.0 and target 3.2?
It'll work. I'm using them in the same configuration currently, but I've been using NSXMLParserDelegate with 3.2 till too, not really sure why it won't work for you.
Was googling for NSXMLParserDelegate and came across this question -
Error Building Project With NSXMLParserDelegate
or
NSXMLParserDelegate compile problem - iPhone SDK 30. vs 4.0
Maybe this will work?
Related
I developing iPhone application for iOS 4.2 using latest SDK iOS5. I trying to add external classes Kal
but i gives me error "ARC forbids explicit message send of 'autorelease', 'retain', and 'release'". And i want to add this classes in my application in any how condition.
I want to execute that classes in my application.
I stuck on two points basically,
1) How i use explicit use of retain, release, and autorelease keywords
2) How i deploy my app on 4.0 lower version from latest iOS 5.0(Containing ARC scheme)
Thanks
RRB
There is a refactoring that will convert your classes to be compatible with ARC.
In XCode menu: Edit - Refactor - Convert to Objective-C ARC.
See this question for an explanation of how to disable ARC on a per-file basis. The solution here is probably to disable ARC for the Kal files while leaving it enabled for the rest of your project. (ARC works fine on iOS 4.0 with a couple of minor exceptions.)
You can turn the ARC off in the Xcode 4.2 for your project.
For more info , see the blogpost
Also , see this SO question
I want to check if a particular device is having base sdk 5.0 or 4.3 or 4.2 or any other iOS sdk version. To put it more clearly, I want a particular code to run only and only if the iOS sdk version is 5.0 (using the APIs only supported in iOS 5) and if it is less than 5.0, then I want a different code to run. Does anyone has any idea about this???
Use the - (BOOL)respondsToSelector:(SEL)aSelector to check if the object has iOS version specified selector.
I would try setting application properties in Xcode. Start reading here.
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?
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.
I am planning to do a app which works on 3.1 and launches on 3gs as well. Please let me know how will it be displayed when launched at iTunes connect ? will it be like works on 3.1 and above and will get installed on iphone 3.1, 3.1.2, 3gs and 4.0.1 or just works on 3.1 alone. Please enlighten me what has to be done for working on all the 4 version devices.
It seems you need to read a bit about the Base SDK and Target SDK. It can be a bit confusion, your right. There is a very nice article at: Developing iPhone Apps with iOS4 SDK, Deploying to 3.x Devices
You should have no problem in making an app that runs on all the devices you want. I hope it helps.
As long as nothing has been deprecated, it should be forward compatible.
I normally set my base SDK to 4.0 and build against 3.0 so it will work on anything 3.0 and above.
I have an app on the store which was built for 3.1.2, but which was crashing under 4.0GM. I've fixed the crash problem using Xcode 3.2.3, but was also getting warnings that such-and-such class did not implement NSXMLParserDelegate. I added to the headers and everything seemed fine. I've now submitted the app and it's waiting for review. This latest version was compiled with base SDK of 4.0, and a deployment target of 3.1.2.
The problem I have is that this morning I opened up the project in Xcode 3.2.2, and when building against base SDK of 3.1.2, I'm getting compile errors saying that NSXMLParserDelegate does not exist. Does this mean my app that is waiting for review is going to crash under 3.1.2 devices? This is strange, because my beta testers who are using 3.1.3 and I think 3.1.2, said the app works fine. Shouldn't it crash if it can't compile against base SDK of 3.1.2?
I think this should be ok to discuss in regards to the 4.0 NDA, as my problem is specific to 3.1.X.
First of all, the NDA has been lifted this week, so no problem to discuss the iOS 4.0 SDK.
As for your question: there's a difference between compiling and running an application.
The NSXMLParserDelegate protocol was added in the iOS4 SDK. In previous versions of the SDK, the XML parser delegate methods were declared in a category. In iOS4, these methods have been moved to a dedicated protocol, which makes it a litte cleaner. At runtime, there's no difference. Once compiled, the app doesn't know anything about protocols or categories. The NSXMLParser will simply check if a specific delegate method is implemented (via respondsToSelctor), so it will run just fine.
In general, it's not a problem to build with iOS4 SDK and run on 3.0. You do have to make sure you don't call any methods that don't exist in 3.0. This is very easy to do by calling respondsToSelector. It allows you to create a single app that runs on all OS versions, but still allows you to call 4.0-specific methods.
I hope this makes sense ...