Hi!
Now this is an interesting case.
You save a webarchive file from Safari to your desktop. It works fine, Safari can open it. No problems.
If you drag&drop this webarchive into my app, the file will be moved to my app's container folder with
FSMoveObjectAsync
function. After that the webarchive will not open, because "... it is damaged and can't be opened".Moving the file back doesn't help. It looks like macOS security system has put it into the quarantine.
Now the tricky part is that there is no issues, if I run in non-sandbox mode. In sandbox, webarchives get damaged.
No other file types suffer from this. Only webarchives.
It seems like my app is missing some sandbox entitlement to be able to handle webarchives. But I don't know which one.
When trying to open 'quarantined' webarchive, the Console shows the following messages:
default 14:52:38.315509 +0300 trustd cert[2]: AnchorTrusted =(leaf)[force]> 0
default 14:52:38.317399 +0300 authd MacOS error: -67050
default 14:52:38.326217 +0300 syspolicyd MacOS error: -67062 default 14:52:38.328629 +0300 syspolicyd temporarySigning type=3 matchFlags=0x0 path=/Users/ujey/Sample.webarchive
default 14:52:38.333031 +0300 syspolicyd MacOS error: -67062
Please help.