Xcode 5/iOS SDK 6.1 でビルドしています。アプリが iOS 7.x デバイスで実行されている場合は、設定 "Settings -> General -> BackgroundAppRefresh" がアプリに設定されているかどうかを確認する必要があります。このプロパティは iOS 7 でのみ使用できるため、次のことを行っています。
if([[UIApplication sharedApplication] respondsToSelector:@selector(backgroundRefreshStatus)])
{
NSInteger outcome=[[[UIApplication sharedApplication] performSelector:@selector(backgroundRefreshStatus)] integerValue];
//do something with "outcome"
}
しかし...「respondsToSelector」呼び出しを渡すため、奇妙な「performSelector」行でiOS 7でアプリがクラッシュしますか?? 誰でも理由を知っていますか?私も同じ結果で NSSelectorFromString(@"backgroundRefreshStatus") を試しました。