Mojave Privacy with Drag & Drop and Helper Apps

Good news! I made a bunch of changes, and now it seems to be working.

To recap, this is a Developer ID codesigned (but not sandboxed, and not mac-app-store) app which includes a helper app.
I wasn’t able to get the helper app to read Photo files when the main app was authorized.

Here’s what I changed:

  • instead of testing while running both my main and helper apps using remote debugger, I tested in a fully built and code-signed app.
  • Added these plist entries to my main app:
NSPhotoLibraryUsageDescription:"This app can read metadata such as picture title and description when you drag & drop images "
com.apple.security.assets.pictures.read-write:true
com.apple.security.personal-information.photos-library:true
  • added this plist entry to my helper app:
com.apple.security.inherit:true
  • Updated to 10.14.1 beta 3 (18B57c)
  • when communicating the URL for the file from my main app to helper app, instead of just sending the file URL over IPCSocket, I’m now sending the bookmark data:
  Main App:
      bookmarkData = CFBookmarkMBS.CreateBookmarkData(theFolderItem)
  Helper App:
    dim options as Int32 = 0
    dim relativeTo as FolderItem = nil
    dim isStale as boolean
    theFolderItem = CFBookmarkMBS.ResolveBookmarkData(bookmarkData, options, relativeTo, isStale )
  • used tccutil reset All before testing
  • deleted all copies (including leftover debug copies) of my app before testing

Some of these steps may not be required.

Also:

  • this is a 64 bit build using the latest Xojo beta
  • the main and helper app have different bundle IDs (of the form com.mycompany.main and com.mycompany.helper)