Post

Replies

Boosts

Views

Activity

Sharing PDF file from Safari with Action Extension failing in Swift 4.2 Xcode 10
I am writing an app with the "App Groups" capability enabled. The Action Extension in this app is open to PDF files and is available when a web page loaded in Safari is opened in reader mode and then converted to PDF.In short, the app can take in the Webpage converted to PDF file from Safari. It was working alright before upgrading to Swift 4.2. Ever since downloading Xcode 10, it has stopped working with the following error:(Error Domain=NSItemProviderErrorDomain Code=-1000 "Cannot load representation of type com.adobe.pdf" UserInfo={NSLocalizedDescription=Cannot load representation of type com.adobe.pdf, NSUnderlyingError=0x600002dd9a70 {Error Domain=NSPOSIXErrorDomain Code=22 "Invalid argument" UserInfo={NSLocalizedDescription=Cannot issue a sandbox extension for file "/Users/***/Library/Developer/CoreSimulator/Devices/FE5463C2-FAA3-41A9-938B-C1C234EA966A/data "/Containers/Data/Application/B6FB42C6-B4E3-46D8-B9F9-5856FF88F0B6/tmp//Safari - Sep 22, 2018 at 10:00 PM.pdf": Invalid argument}}})Can anyone throw some light on what is happening? Both the app and its action extension belong to the same App Group. The Action Extension has the following entries in the info.plist: NSExtensionAttributes NSExtensionActivationRule SUBQUERY ( extensionItems, $extensionItem, SUBQUERY ( $extensionItem.attachments, $attachment, ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "com.adobe.pdf" || ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.file-url" ).@count == $extensionItem.attachments.@count ).@count == 1 NSExtensionMainStoryboard MainInterface NSExtensionPointIdentifier com.apple.ui-services
3
0
2.7k
Sep ’18