Documents/Images display fine in Simulator, but not on my device

Posted by Phamer on Stack Overflow See other posts from Stack Overflow or by Phamer
Published on 2010-05-19T23:14:18Z Indexed on 2010/05/20 0:10 UTC
Read the original article Hit count: 153

Filed under:
|
|
|

Hello.

My application is running fine on the simulator, but not on the device. Basically, any documents from the web (PDF, Word, M4P videos) are working great on the simulator (and can be accessed from Safari on the iPhone). However, running on the iPhone, they don't display anything. Here's some sample code:

    // 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];

Within documentViewController I have:

- (void)viewDidLoad {
    [super viewDidLoad];
    [webView loadRequest:[NSURLRequest requestWithURL:documentUrl]];
} 

As I said, works like a charm in the Simulator...What could possibly causing this NOT to work on iPhone? How do I debug the issue???

© Stack Overflow or respective owner

Related posts about documents

Related posts about simulator