iOS 9 Content Blocker: reloadContentBlockerWithIdentifier errors out when refreshing content blocker extension

I'm having an issue where I'm reloading the iOS 9 Safari content blocker extension whenever the content in my parent app changes; however, when I call the following method, I get error ContentBlockerErrorDomain error 3: The operation couldn’t be completed.


[SFContentBlockerManager
     reloadContentBlockerWithIdentifier:@"xxBundleIDHerexx"
     completionHandler:^(NSError * _Nullable error) {
          NSLog(@"Error: %@", error.localizedDescription);
     }];


I'm runnign Xcode 7 beta 6 and beta 5 of iOS 9 on a device. I'm having this same issue on both the simulator and the device, and cannot seem to figure out why it's doing this, and there's not much information to go on here. The docs are pretty silent on these errors in terms of what they could mean.


The only way that I can get a the content blocker JSON files to reload is by going to Settings | Safari | Content Blockers, and disable, then re-enable the extension, which works properly; however, I need to be able to trigger this update from inside of the parent app.


Has anyone else experienced this issue? If so, do you know what causes it?

Does your Extension read the user defaults from the App?


Does your Extension read the /Documents from the main App?

@Rui Yes, it uses the NSUserDefaults (via App Groups) to read a set of values that the parent app writes. Does this affect the behavior of this method?

I get the same error. My extension also reads the blocker script from the app group container via NSFileManager. Does this not work with app group sharing?

iOS 9 Content Blocker: reloadContentBlockerWithIdentifier errors out when refreshing content blocker extension
 
 
Q