Hello, I have a sandboxed app distributed through macOS AppStore. It downloads some 'dylib' files from a server(internet) and later loads using dlopen(). But the downloaded files have quarantine flag set and thus Gatekeeper shows a warning when the app loads them.
-
Added LSFileQuarantineEnabled in info.plist and set to false but it didn't help.
-
Tried to run a shell command "xattr -d filename" from the app itself but that doesn't work too due to "operation not permitted" error.
-
Tried [file1 setResourceValue:nil forKey:NSURLQuarantinePropertiesKey error:nil] but even this doesn't make any difference. Although the return value of the call is "YES", the quarantine flag is still there. Note : when i run this method from a non-sandboxed app, it works.
Now I don't have any more options. Is there any way a sandboxed app can download a file and remove the quarantine attribute?
It downloads some
.dylib
files from a server (internet) and later loads usingdlopen
.…
Can anyone tell me if I can just go ahead and use the flag and submit to app store ?
First up, the decision about what is or isn’t allowed on the store is made by App Review. I don’t work for App Review and can’t make definitive statements on their behalf.
Having said that:
-
com.apple.security.files.user-selected.executable
is intended for apps that are generating code locally, like an IDE. It was not created to facilitate running code that was downloaded from the ’net. -
App Review has published policy about this in their App Store Review Guidelines (search for “download”).
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"