Code Monkey home page Code Monkey logo

leighmcculloch / appsandboxfileaccess Goto Github PK

View Code? Open in Web Editor NEW
114.0 114.0 23.0 201 KB

A class that wraps up writing and accessing files outside a Mac apps App Sandbox files into a simple interface. The class will request permission from the user with a simple to understand dialog consistent with Apple's documentation and persist permissions across application runs.

License: BSD 2-Clause "Simplified" License

Ruby 3.12% Objective-C 96.88%

appsandboxfileaccess's Introduction

Hi there. I'm Leigh, an Aussie ๐Ÿ‡ฆ๐Ÿ‡บ software engineer. I'm passionate about open source and simplicity, and enjoy building SDKs, backends and tools with Go, Rust, Ruby, WASM, PostgreSQL, and other tech.

๐Ÿ”ญ Iโ€™m building the Soroban execution platform for the Stellar network at the Stellar Development Foundation. It's powered by WASM.

๐Ÿ’ป I'm developing with Rust and Go.

๐Ÿ“š Iโ€™m learning Zig.

Find ways to connect with me at leighmcculloch.com.

appsandboxfileaccess's People

Contributors

demitri avatar leighmcculloch avatar regexident avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

appsandboxfileaccess's Issues

Custom NSOpenPanel action?

Hi,I want to custom NSOpenPanel when askPermissionForURL, action such as new folder button on panel.
'openPanel setCanCreateDirectories:YES'
And I can create new folder ,then write new file on this folder.

Dealing with Full Disk Access and Files & Folders Access

I've been using these great classes in my app for a while. I'm finally getting around to updating my app for Mojave and Catalina, both of which introduced new security restrictions. This has broken a lot of my code in unexpected ways. There are cases where attempting to open a file through the open dialog will still fail unless FDA permission is given. This is turning my code into spaghetti.

The core of the problem is that there is no API to tell you if a file's access is blocked because of these restrictions, but can be given if the user turns on these permissions. See this thread from a year ago; I don't think anything has changed (certainly not for Mojave):

Reliable test for Full Disk Access?

Apple says not to assume a set of directories that fall under these permissions, but provides no way of testing whether FDA is on or not or which folders is applies to. I was thinking that AppSandboxFileAccess is the right place to put these tests and return an "educated guess" as to why a file cannot be read. It might even go as far as to put up a window showing the user how to turn on FDA and Files and Folders access.

Is there any interest in this?

Does this work in Yosemite?

I've been trying to use this but it looks like it only works the first time in a specific folder, and the persisting doesn't actually work โ€” subsequent tries sandboxd just gives a deny file-write-create (or whatever) error

Looks like this was updated last 8 months ago, not sure if it still works for you or it's just me

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.