Sandbox - a Levure Helper for working with files in the macOS sandbox

Trevor DeVore lists at mangomultimedia.com
Tue Oct 9 00:27:49 EDT 2018


Hi,

I've posted a new Levure helper on GitHub called "sandbox". It adds support
for working with file references across multiple app sessions in the macOS
sandbox. It requires LiveCode 9 as it uses the Foreign Function Interface
(aka FFI) to wrap Objective-C APIs.

If you distribute your apps through the Mac App Store then it is required
that you sandbox your application. When an application is sandboxed the
user has to give you explicit permission to open any files that reside
outside of your applications container. For example, a user can do this by
selecting a file using the `answer file` dialog or dragging a file onto
your application. Your application will then have permission to access that
file for the rest of the app session.

The next time your application launches, however, your application will not
have permission to open the files again unless you implement
security-scoped bookmarks and security-scoped urls. The helper uses an LCS
library wrapped around an LCB extension to try and hide the complexity.

To learn more visit the GitHub page:

https://github.com/trevordevore/levurehelper-sandbox

If you don't use Levure but are interested in the LCB FFI code here is a
direct link to that file:

https://github.com/trevordevore/levurehelper-sandbox/blob/master/macos_sandbox.lcb

-- 
Trevor DeVore
ScreenSteps
www.screensteps.com



More information about the use-livecode mailing list