Created
September 18, 2018 10:28
-
-
Save nderkach/cd067799c9a854520a824ccf89df6c6c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ContentBlockerRequestHandler: NSObject, NSExtensionRequestHandling { | |
func beginRequest(with context: NSExtensionContext) { | |
let attachment = NSItemProvider(contentsOf: Bundle.main.url(forResource: "blockerList", withExtension: "json"))! | |
let item = NSExtensionItem() | |
item.attachments = [attachment] | |
context.completeRequest(returningItems: [item], completionHandler: nil) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment