私のアプリケーションはシミュレーターでは正常に動作していますが、デバイスでは動作していません。基本的に、Web からのドキュメント (PDF、Word、M4P ビデオ) は、シミュレーターで問題なく動作します (iPhone の Safari からアクセスできます)。ただし、iPhone で実行すると、何も表示されません。サンプルコードは次のとおりです。
// Set up the URL
documentViewController.documentUrl = [NSURL URLWithString:[NSString stringWithFormat:mobileContentUrl]];
// mobileContentUrl is something like: http://www.myserver.com/pathitem/Video.mp4" and can be accessed from Safari
[self.navigationController pushViewController:documentViewController animated:YES];
documentViewController 内には次のものがあります。
- (void)viewDidLoad {
[super viewDidLoad];
[webView loadRequest:[NSURLRequest requestWithURL:documentUrl]];
}
私が言ったように、シミュレータでは魅力のように機能します...これがiPhoneで機能しない原因は何ですか? 問題をデバッグするにはどうすればよいですか???