I have developed an application using last SDK (4.3) and XCODE 4. I have tried this application on iPhone 4 and 3GS but always with IOS 4.3 on them.
Now I try to test my application on a 3G Iphone with IOS 3.1.3. To to that I declare “IOS Deployment Target” to be 3.1.
But their are compilation errors for the following pieces of code :
UIDevice* device = [UIDevice currentDevice];
BOOL backgroundSupported = NO;
if ([device respondsToSelector:@selector(isMultitaskingSupported)])
backgroundSupported = device.**multitaskingSupported**;
if (backgroundSupported)
[request setShouldContinueWhenAppEntersBackground:YES];
Compilation error : “Request for member ‘multitaskingSupported’ in something not a structure or union
And : “ASIFormDataRequest may not respond o ‘ – setShouldContinueWhenAppEntersBackground’
if ([[UIApplication sharedApplication] respondsToSelector:@selector(applicationState)] && [[UIApplication sharedApplication] applicationState] == **UIApplicationStateBackground**) {
...
}
Compilation error : “UIApplicationStateBackground undeclared first use in this function)
I do want to keep these behaviors for IOS4. How can I manage to have this compiled for target 3.1 ?
Thanks for your help !
kheraud
Make sure that, in your project or target info box, you have
Base SDKset toiOS 4.2, andiOS Deployment Targetset toiOS 3.1. It sounds to me like your Base SDK is set wrong.