2013-01-17 50 views
4

我收到以下錯誤剛過我按文檔交互控制器按鈕中的一個,即複印,打印等:UIDocumentInteractionController導致未知的應用程序標識符com.apple.mobilemail失敗的錯誤

Launch Services: Registering unknown app identifier com.apple.mobilemail failed 
Launch Services: Unable to find app identifier com.apple.mobilemail 

這裏是代碼創建交互控制器 - 網址等是即使我已經實現了委託方法是怪異的所有有效然而委託電話不打我的控制器:

UIDocumentInteractionController *documentInteractionController = [UIDocumentInteractionController interactionControllerWithURL:fileURL]; 
documentInteractionController.delegate = self; 
[documentInteractionController presentOptionsMenuFromRect:self.view.bounds 
                   inView:self.view 
                   animated:YES]; 

//None of these delegate methods are ever called which is weird: 
- (void) documentInteractionController: (UIDocumentInteractionController *) controller 
     willBeginSendingToApplication: (NSString *) application 
{ 
    DebugLog(@"skldjfklsdjflksdjflsdk %@", application); 
} 



- (void) documentInteractionController: (UIDocumentInteractionController *) controller 
      didEndSendingToApplication: (NSString *) application 
{ 
    DebugLog(@"skldjfklsdjflksdjflsdk %@", application);  
} 

- (void)documentInteractionControllerDidDismissOptionsMenu:(UIDocumentInteractionController *)controller 
{ 

} 

- (void)documentInteractionControllerDidDismissOpenInMenu:(UIDocumentInteractionController *)controller 
{ 

} 

回答

3

我設法排序了這一點 - 對於一些或其他原因有一個autorelease bu在G級,你需要的時候你初始化交互控制器使用屬性 - 很奇怪,但完美的作品對我來說:

@property (nonatomic, strong) UIDocumentInteractionController *documentInteractionController; 

self.documentInteractionController = [UIDocumentInteractionController interactionControllerWithURL:fileURL]; 
self.documentInteractionController.delegate = self; 
[self.documentInteractionController presentOptionsMenuFromRect:self.view.bounds 
                  inView:self.view 
                  animated:YES]; 
+0

當我從文檔交互控制器按郵件我的委託方法不叫,我有嘗試你的答案也是。 – Verma

相關問題