4

ドキュメントインタラクションコントローラボタンの1つ、つまりコピー、印刷などを押した直後に、次のエラーが発生します。

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

インタラクションコントローラーを作成するコードは次のとおりです。URLなどはすべて有効ですが、デリゲートメソッドを実装したにもかかわらず、デリゲート呼び出しがコントローラーにヒットしません。これは奇妙なことです。

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
{

}
4

1 に答える 1

3

私はこれを整理することができました-何らかの理由でクラスに自動解放のバグがあり、相互作用コントローラーを初期化するときにプロパティを使用する必要があります-非常に奇妙ですが、私にとっては完全に機能します:

@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];
于 2013-01-17T15:07:53.323 に答える