What I'm trying to achieve here is, I have a Adobe flex app which has a native extension and here is the native code which I use to open the file in QLPreviewController. The problem is this works great with small files approx <1M. But with bigger files the QLPreviewController launches and then crashes. Well sometimes it works for few seconds and then crashes, or sometimes even works fine but when I close it by pressing done the App itself crashes.
The code works fine for file of smaller sizes and does not have any issues opening and closing those files multiple times. One more thing that I noted is the issues does not happen with ios 4.. its able to open big files too. But once I upgraded to 5.. this issues started happening.
QLPreviewController *previewController = [[QLPreviewController alloc] init];
previewController.dataSource = self;
//previewController.delegate = self;
// start previewing the document at the current section index
previewController.currentPreviewItemIndex = 0;
//[[self navigationController] pushViewController:previewController animated:YES];
[[[[UIApplication sharedApplication] keyWindow] rootViewController]
presentModalViewController:previewController animated:YES];
[previewController release];
Any help/comments/suggestions are appreciated. Thanks in advance.