我按下其中一个文档交互控制器按钮,即邮件等后,我收到以下错误:
LaunchServices: invalidationHandler called
我的电子邮件未配置iPhone设备。我想显示该警告。
以下是创建交互控制器的代码 - URL等都是有效的,但是委托调用没有命中我的控制器,即使我已经实现了委托方法。
- (void)openAppList:(FileInfo *)fileinfo {
NSURL *fileURL = [NSURL fileURLWithPath:fileinfo.fullName];
UIDocumentInteractionController *interactionController = [UIDocumentInteractionController interactionControllerWithURL:fileURL];
[interactionController retain];
interactionController.delegate = self;
BOOL present = [interactionController presentOptionsMenuFromRect:CGRectZero inView:self.tabBarController.view
animated:YES];
if (!present) {
[MainteOrErrorDialog initWithErrorCode:kAlertNotOpenInFileId filename:fileInfo.filename target:nil action:nil];
} else {
[interactionController retain];
}
}
UIDocumentInteractionDelegate方法
- (void)documentInteractionController:(UIDocumentInteractionController *)controller
willBeginSendingToApplication:(NSString *)application
{
NSLog(@"Will Begin: %@", application);
}
- (void)documentInteractionController:(UIDocumentInteractionController *)controller
didEndSendingToApplication:(NSString *)application
{
NSLog(@"Did End: %@", application);
}