I use dateByAddingTimeInterval method. I checked this method on iPhone with iOS 3.1 and it's worked! But in documentation said that this method available in iOS 4.0. Why this method worked in iOS 3.1?
It looks like an error in the documentation. The header specifies:
- (id)dateByAddingTimeInterval:(NSTimeInterval)ti NS_AVAILABLE(10_5, 2_0);
So it's available in 10.5, and iOS 2.0. That's why it is present in iOS 3 and later.
Related
Im integrating FacebookSDK in my app with ios6 and Xcode4.5 .But when I run the app in prevoius versions of XCode (Xcode 4.2 with ios5) I couldn't be able to link Social.Framework and AdSupport.Framework .They are missing and I couldn't find it under Build Phases.Gone through Google and found they are not present in ios5.But when I make those Frameworks as optional .I have made them as optional.But that doesnot work for me .And I couldnot find any turnaround solution to this.
How can I get it worked in xcode4.2
iOS started supporting Facebook API which is Social.Framework is included in iOS 6. It's not available in earlier version for Facebook. You won't get a framework for iOS facebook api in XCode 4.2.
EDIT :
In this case what you have to do is, keep the framework optional which you have already done. Check if Facebook class exists before you call the function. If it does that means user is using iOS 6 or greater version then iOS 6. If it doesn't means user is using iOS version less then iOS 6. To give the reverse compatibility you'll have to implement the Facebook API.
IOS 5 has some new built-in APIs to make it really easy to read and write JSON. If i'm building an app using these APIs, will it work on the devices with lower versions of IOS??
No, since it is not available. iOS 5 only classes and methods will only work iOS 5 and higher.
In the documentation of NSJSONSerialization it states that it is Availability as "Available in iOS 5.0 and later."
You could always check if a class is available like:
if ([NSJSONSerialization class]) {
// Yes the class is available.
}
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.
Does an app compiled with base sdk 5.0 will work on iOS4.x ?
I have made deployment target to 4.0. Will ARC work on iOS4.x devices. Is there a way to support both in a same app? If I am using ARC in iOS5, will memory management occur properly in iOS4.x devices?
Apple has stated that ARC will work in iOS 4 (not sure if they mentioned a specific version or if it includes iOS 4.0). But, I don't think you can submit ARC applications until iOS5 is out...
ARC is a compiler level feature. So it will not be affected by SDK. Apple will support ARC on 4.0 and 5.0 However, as on date, you cannot submit an app built using a beta version of Xcode.
If deployment target is set to 4.0, the app will support all higher versions iOS including 4.0. So the answer is YES.
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?