私のアプリはシミュレーターで問題なく動作しますが、開発者ライセンスを取得したので、iPod Touch で実行しようとすると、xcode と表示されます。GBD: Program received signal: "SIGABRT".
ここで何が問題なのかを理解するにはどうすればよいですか? ビルド時に警告は表示されません。
編集:申し訳ありませんが、デバイスでアプリを実行するのはこれが初めてなので、ご容赦ください。オーガナイザー ウィンドウとデバッガーが、デバイスで何が起こっているかのログを表示していることに気付きました。これが問題です:
[UIApplication setStatusBarHidden:withAnimation:]: unrecognized selector sent to instance 0x1160e0
そして、それが参照しているコードは(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
問題のあるコードは次のとおりです。
`if (interfaceOrientation == UIInterfaceOrientationLandscapeLeft || interfaceOrientation == UIInterfaceOrientationLandscapeRight) {
self.view = clockView;
[[UIApplication sharedApplication] setStatusBarHidden:YES withAnimation:NO];
return YES;
}
if (interfaceOrientation == UIInterfaceOrientationPortrait) {
self.view = homeView;
[[UIApplication sharedApplication] setStatusBarHidden:NO withAnimation:NO];
return YES;
}
if (interfaceOrientation == UIInterfaceOrientationPortraitUpsideDown) {
self.view = homeView; [[UIApplication sharedApplication] setStatusBarHidden:NO withAnimation:NO];
return YES;
}
else {
return YES;
}
`