Good morning everyone,
Trying to figure out what is happening with my content blocker for iOS Safari under iOS 9.0.2. When I run from Xcode on my device, everything works perfectly. Content blocker blocks content. Enable it. Disable it. Perfect.
However, when I submit to app store, reviewer said they couldn't confirm it blocked any content. So I took the same build and submitted it to TestFlight, and then downloaded on my actual device. When I launch the app part on the device, it looks fine. However, when I go into Settings -> Safari -> Content Blockers and enable mine, I get this error in the device console log:
Oct 13 07:12:24 Andrews-iPhone6 Preferences[203] <Warning>: Error loading content blocker (com.AndrewBenson.AndrewBundleName---Content-Blocker): Error Domain=NSCocoaErrorDomain Code=4097 "connection to service named com.apple.SafariServices.ContentBlockerLoader" UserInfo={NSDebugDescription=connection to service named com.apple.SafariServices.ContentBlockerLoader}
When I launch Safari then, no content is blocked, and no amount of closing and reopening Safari and enabling and disabling the blocker will make it work.
I did stick some NSLogs in my ActionHandler for the content blocker just to make sure beginRequestWithExtensionContext was getting called, but it is working. Additionally, I call completeRequestReturningItems with a completion handler and no error is getting returned.
Any ideas would be greatly appreciated.
Thanks,
Andrew