/ElectronSecurityScopedBookmarkTest

A small test app for electron security scoped bookmarks

Primary LanguageVue

Deprecated

No longer maintained.


Electron Security Scoped Bookmark Test App

This tests the implementation of security scoped bookmarks. These are necessary for building MAS (Mac App Store) builds. The only complete documentation is the Github PR, though there is also some in the docs.

Installing

mkdir bookmarkTest
cd bookmarkTest
git clone https://github.com/rr326/ElectronSecurityScopedBookmarkTest .
yarn install

Now you need:

  1. Mac Developer Identity
  2. A Develloer Provisioning Profile with Device IDs for your development machine(s)
  3. Update package.json ==> macDeveloperIdentityHash and provisionprofile
    • macDeveloperIdentityHash - try security find-identity -p codesigning -v and look for Mac Developer: ...
    • provisionprofile - this is a "Mac Provisioning Profile (Development)" exported from your Developer Account

You can try this page for some help on that.

When you've done that, try: yarn dist

Hopefully it will build and sign.

Then try: open dist/mas/ElectronSecurityScopedBookmarkTestApp.app

What Should Happen

Source: Reading the code at atom/browser/ui/file_dialog_mac.mm. Particularly OpenDialogCompletion and GetBookMarkDataFromNSURL

  • Non-MAS build: bookmarks === undefined
  • MAS build
    • securityScopedBookmarks: false ==> bookmarks === []
    • securityScopedBookmarks: true
      • Success: bookmarks === ["SLKDJFLKSDJLSJDLFJSLKJFLS..SJLD"]
      • Error: bookmarks === ['']