« touchengine -- iPhone Google App Engine communication | Main | Enumerating and visualizing all fonts on iPhone »

Microsoft Office Formats won't load on the iPhone simulator

Just an FYI:

The UIWebView in the simulator remains blank when loading MS office formats like word (.doc), excel (.xls), powerpoint (.ppt) (and possibly iWork formats as well -- Go Go Gadget Google indexer), but it does work on the device itself. Caveat coder. Don't pull your hair out for too long wondering why your files don't show up on the simulator. They will once you compile and install on the phone.
    NSString *filePath = @"pathToAnExcelDocument.xls";
    if ([[NSFileManager defaultManager] fileExistsAtPath:filePath] == YES) 
    {
        NSLog(@"Loading %@", filePath);
        NSURL *pathURL = [NSURL fileURLWithPath:filePath];
        //Warning: this doesn't load into the view on the simulator
        NSURLRequest *pathURLRequest = [NSURLRequest requestWithURL:pathURL];
        [someWebView loadRequest:pathURLRequest];
    }
radar://6417654