Can not email PDF from QLPreviewController

246 Views Asked by At

I'm successfully loading a PDF file downloaded from the web into QLPreviewController. When I tap the "Share" button and then tap the Mail icon to email the PDF, the mail composer window shows momentarily (without the PDF), then dismisses on it's own. Then, on my Mac, a "Problem Reporter" window shows up with the following details:

Process: MailCompositionService [68119] Path:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/Applications/MailCompositionService.app/MailCompositionService Identifier: MailCompositionService Version:
1.0 (1.0) Code Type: X86-64 (Native) Parent Process: launchd_sim [67687] Responsible: launchd_sim [67687] User ID: 501

Date/Time: 2014-12-10 16:03:36.006 -0600 OS Version:
Mac OS X 10.10.1 (14B25) Report Version: 11 Anonymous UUID:
027528DA-56B6-94EF-4660-573FD98B58EC

Sleep/Wake UUID: BC8F4A6B-CCAC-4E18-9A39-A6F533C76D2E

Time Awake Since Boot: 1700000 seconds Time Since Wake: 1700000 seconds

Crashed Thread: 0 Dispatch queue: com.apple.main-thread

Exception Type: EXC_CRASH (SIGABRT) Exception Codes:
0x0000000000000000, 0x0000000000000000

Application Specific Information: * Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '* -[NSRegularExpression enumerateMatchesInString:options:range:usingBlock:]: nil argument' terminating with uncaught exception of type NSException abort() called

This is also printed in the Xcode log:

2014-12-10 16:03:36.862 Q-Scribe[67995:17783435] viewServiceDidTerminateWithError: Error Domain=_UIViewServiceInterfaceErrorDomain Code=3 "The operation couldn’t be completed. (_UIViewServiceInterfaceErrorDomain error 3.)" UserInfo=0x7be9b8c0 {Message=Service Connection Interrupted} 2014-12-10 16:03:45.788 Q-Scribe[67995:17878367] timed out waiting for fence barrier from com.apple.MailCompositionService

One of Apple's mail libraries is obviously crashing. All answers to similar questions suggested things that assumed a reference to the MFMailComposeViewController, but since I'm in QuickLook, I don't have access to it.

This is occurring on the iOS 8 iPad simulator.

How can I email my PDF from QLPreviewController?

0

There are 0 best solutions below