1

iOS6 and xcode 5.01;

When i run with iphone simulator, it can preview the file, but with device, it failed.

//device path
NSString *path = @"/var/mobile/Applications/1AE864F5-A57F-47E7-829E-69DCFC63D8CD/tmp/11523invite.ics";
UIDocumentInteractionController *controller = [UIDocumentInteractionController interactionControllerWithURL:[NSURL fileURLWithPath:path isDirectory:NO]];
controller.delegate =self;
[controller presentPreviewAnimated:YES];

What's happend?

2
  • Device path is static or generate at run time?? "/var/mobile/Applications/1AE864F5-A57F-47E7-829E-69DCFC63D8CD/tmp/11523invite.ics". Dec 30, 2013 at 10:35
  • @PiyushDubey Generated at rum time.
    – sacreddr
    Dec 31, 2013 at 2:15

1 Answer 1

0
@property (nonatomic, retain) UIDocumentInteractionController *docController;

use property of UIDocumentInteractionController

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.