No longer maintained.
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.
mkdir bookmarkTest
cd bookmarkTest
git clone https://github.com/rr326/ElectronSecurityScopedBookmarkTest .
yarn install
Now you need:
- Mac Developer Identity
- A Develloer Provisioning Profile with Device IDs for your development machine(s)
- Update
package.json
==>macDeveloperIdentityHash
andprovisionprofile
macDeveloperIdentityHash
- trysecurity find-identity -p codesigning -v
and look forMac 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
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 === ['']