I get the following error while load the json file with SFContentBlockerManager.reloadContentBlockerWithIdentifie
Optional(Error Domain=ContentBlockerErrorDomain Code=1 "(null)")
// This is my code to get attachment
let documentDirectoryURL = try! NSFileManager.defaultManager().URLForDirectory(.DocumentDirectory, inDomain: .UserDomainMask, appropriateForURL: nil, create: true)
let jsonFileUrl = documentDirectoryURL.URLByAppendingPathComponent("phantom.json")
let data = NSData(contentsOfURL: jsonFileUrl)
let attachment = NSItemProvider(item: data,typeIdentifier: kUTTypeJSON as String)
let item = NSExtensionItem()
item.attachments = [attachment]
context.completeRequestReturningItems([item], completionHandler: nil);
// Following code for SFContentBlockerManager
try! SFContentBlockerManager.reloadContentBlockerWithIdentifier("\(NSBundle.mainBundle().bundleIdentifier).PhantomBlocker", completionHandler: {(error) in print(error)})