Content Blocker in iOS app in mac m1 vs Mac Catalyst app

Hi,

We have an iOS app with Safari and Content Blocker extensions. Everything works fine when running the app on M1 devices except for the content blocker. The issue is with the following code:

contentBlockerManager.getStateOfContentBlocker(withIdentifier: "...") { [ weak self ] in state, error
   ... 
}

I receive an error which I believe means the content blocker was not found:

SFErrorDomain error 1

Now, when running the exact same app with Mac Catalyst all works as expected.

Is there a reason for this to happen?

Thanks.

Replies

I'm having the same problem. To date, this issue has not been fixed. Not only that, but all the ad blockers from other developers don't work either.

I think this is a bug.

I'm also having the exact same problem :(

Hope this bug fixed soon

swift:

        SFContentBlockerManager.getStateOfContentBlocker(withIdentifier: extensionBundleIdentifier) { blockerState, error in
            print(blockerState ?? "",
                  error?.localizedDescription ?? "")
        }

console:

The operation couldn’t be completed. (SFErrorDomain error 1.)

swift:

        Task {
            do {
                try await SFContentBlockerManager.reloadContentBlocker(withIdentifier: extensionBundleIdentifier)
            } catch { 
                print(error.localizedDescription)
            }
        }

console:

The operation couldn’t be completed. (SFErrorDomain error 1.)