2 Replies
      Latest reply on Oct 18, 2019 8:43 AM by TaiNN
      SyamalaDutt Level 1 Level 1 (0 points)

        With new security and permission related checks including in Mojave and Catalina. In my swift application I am trying to create a copy of file using below function

        “open func copyItem(at srcURL: URL, to dstURL: URL) throws”

        As I call this function , my application entry is created under Full Disk Access panel of  Security & Privacy in System Preferences. Unless until I enable this I can’t create a copy of my file using the function I mentioned above.

         

         

         

         

         

        My issue: This entry getting added to the Full Disk Access is happening silently, I dont see any security alert asking me to allow or dont allow. We dont even have any API to get this information , so that we can  ask user to manually add it.

         

        Where can I get appropriate documentation about Full Disk access feature which will help to understand which locations are restricted to access and how can I enable it programtically without users interference

        • Re: How can we access and add  applications under Full Disk access  pane programatically
          eskimo Apple Staff Apple Staff (12,295 points)

          How can we access and add applications under Full Disk Access pane programatically

          There is no API to get or set the Full Disk Access list in System Preferences.  While it’s impossible to predict the future with 100% accuracy, my best guess is that Apple will not add an API to modify this list; these settings are deliberately meant to be under the control of the user.

          Reading this list, or getting your own app’s status, is a slightly different story.  The best way forward depends on your specific requirements.  You wrote:

          In my swift application I am trying to create a copy of file using …

          What file are you trying to copy?

          Share and Enjoy

          Quinn “The Eskimo!”
          Apple Developer Relations, Developer Technical Support, Core OS/Hardware
          let myEmail = "eskimo" + "1" + "@apple.com"