Hello,
I have use Safari content blocker extension on Mac Catalyst application.
Here is the code for reloadContentBlocker
// Config.BLOCKER_EXTENSION = Content blocker extension bundle identifier
func reloadBlockerRules() {
if #available(macCatalyst 13.4, *) {
SFContentBlockerManager.reloadContentBlocker(withIdentifier: Config.BLOCKER_EXTENSION, completionHandler: { error in
if error != nil {
TextLog.shared.write("RELOAD OF \(Config.BLOCKER_EXTENSION) FAILED WITH ERROR -\(error?.localizedDescription ?? "")")
}
})
} else {
// Fallback on earlier versions
TextLog.shared.write("Fallback on earlier versions - reloadBlockerRules")
}
}
I have reload the blocker rules on application startup but its cashing every time with following reason :
System Integrity Protection: enabled
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Application Specific Information:
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSXPCInterfaceProxy_SafariExtensionHelperProtocol loadContentBlockerWithIdentifier:sandboxExtensionToken:invokedBySafariFamily:reply:]: unrecognized selector sent to instance 0x6000012ac370'
terminating with uncaught exception of type NSException
abort() called
Can you please help me out for find the crash reason ?