My app supports both iOS 6
and iOS 7
. I am using some methods that are available from iOS7
only (like suspend
) but are not available in iOS6
. However, i am using proper branching for iOS6
and iOS7
(putting conditions accordingly). However, i am getting warning when i am using the suspend
method.
This is my method:
-(void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex
{
UIApplication *app = [UIApplication sharedApplication];
if([app respondsToSelector:@selector(suspend)])
{
[app performSelector:@selector(suspend)];
[NSThread sleepForTimeInterval:1.0];
}
exit(0);
}
The warning is
"Undeclared Selector 'suspend'"