Safari Web Extension / DeclarativeNetRequest : Safari 15 crashes when loading rules

Hi,

I'm trying to implement a "content blocker" using the DeclarativeNetRequest permission in a Safari Web Extension. I tried to customize the sample app (ios+MacOS) provided by Apple (https://developer.apple.com/documentation/safariservices/safari_web_extensions/adopting_declarative_content_blocking_in_safari_web_extensions).

However, I observe :

  • a random behaviour on iOS15: rules do not always apply, or are not reloaded
  • crashes on Monterey Beta9 and Safari 15.1 : com.apple.Safari.ContentBlockerLoader crashes on WebKit:runInitializeCode after ConteRuleListStore...

Any idea? Is this a "very beta" feature... documentation is so poor compared to Google's.

Thanks

Replies

Thanks for this feedback!

WIth your iOS 15 behavior you are reporting - do you have any more specifics about specific rules that don't alway apply? How are you trying to reload them?

If you could file a feedback report at https://feedbackassistant.apple.com (ideally with a sample extension!) that would be great.