Enable App Sandbox. #116

Merged
nevack merged 3 commits from nevack/sandbox into master 2021-02-26 20:56:24 -03:00
nevack commented 2021-02-26 10:02:07 -03:00 (Migrated from github.com)
No description provided.
kode54 (Migrated from github.com) reviewed 2021-02-26 10:02:07 -03:00
nevack (Migrated from github.com) reviewed 2021-02-26 10:02:46 -03:00
@ -13,4 +12,3 @@
NSString *TrackArtist = @"Artist";
NSString *TrackAlbum = @"Album";
NSString *TrackTitle = @"Name";
nevack (Migrated from github.com) commented 2021-02-26 10:02:45 -03:00

Got sandbox warnings for doing so.

Got sandbox warnings for doing so.
nevack commented 2021-02-26 11:57:49 -03:00 (Migrated from github.com)

The only error I see now on startup

2021-02-26 16:17:07.363432+0300 Cog[28758:137078] Error loading /Users/nevack/Library/Developer/Xcode/DerivedData/Cog-ffujrjjlvwctciftlnbjtlxqzdql/Build/Products/Debug/Cog.app/Contents/PlugIns/sidplay.bundle/Contents/MacOS/sidplay:  dlopen(/Users/nevack/Library/Developer/Xcode/DerivedData/Cog-ffujrjjlvwctciftlnbjtlxqzdql/Build/Products/Debug/Cog.app/Contents/PlugIns/sidplay.bundle/Contents/MacOS/sidplay, 265): Library not loaded: @rpath/sidplayfp.framework/Versions/A/sidplayfp
  Referenced from: /Users/nevack/Library/Developer/Xcode/DerivedData/Cog-ffujrjjlvwctciftlnbjtlxqzdql/Build/Products/Debug/Cog.app/Contents/PlugIns/sidplay.bundle/Contents/MacOS/sidplay
  Reason: no suitable image found.  Did find:
	file system sandbox blocked open() of '/Users/nevack/Library/Developer/Xcode/DerivedData/Cog-ffujrjjlvwctciftlnbjtlxqzdql/Build/Products/Debug/sidplayfp.framework/Versions/A/sidplayfp'
The only error I see now on startup ``` 2021-02-26 16:17:07.363432+0300 Cog[28758:137078] Error loading /Users/nevack/Library/Developer/Xcode/DerivedData/Cog-ffujrjjlvwctciftlnbjtlxqzdql/Build/Products/Debug/Cog.app/Contents/PlugIns/sidplay.bundle/Contents/MacOS/sidplay: dlopen(/Users/nevack/Library/Developer/Xcode/DerivedData/Cog-ffujrjjlvwctciftlnbjtlxqzdql/Build/Products/Debug/Cog.app/Contents/PlugIns/sidplay.bundle/Contents/MacOS/sidplay, 265): Library not loaded: @rpath/sidplayfp.framework/Versions/A/sidplayfp Referenced from: /Users/nevack/Library/Developer/Xcode/DerivedData/Cog-ffujrjjlvwctciftlnbjtlxqzdql/Build/Products/Debug/Cog.app/Contents/PlugIns/sidplay.bundle/Contents/MacOS/sidplay Reason: no suitable image found. Did find: file system sandbox blocked open() of '/Users/nevack/Library/Developer/Xcode/DerivedData/Cog-ffujrjjlvwctciftlnbjtlxqzdql/Build/Products/Debug/sidplayfp.framework/Versions/A/sidplayfp' ```
nevack commented 2021-02-26 12:18:59 -03:00 (Migrated from github.com)

The only error I see now on startup

2021-02-26 16:17:07.363432+0300 Cog[28758:137078] Error loading /Users/nevack/Library/Developer/Xcode/DerivedData/Cog-ffujrjjlvwctciftlnbjtlxqzdql/Build/Products/Debug/Cog.app/Contents/PlugIns/sidplay.bundle/Contents/MacOS/sidplay:  dlopen(/Users/nevack/Library/Developer/Xcode/DerivedData/Cog-ffujrjjlvwctciftlnbjtlxqzdql/Build/Products/Debug/Cog.app/Contents/PlugIns/sidplay.bundle/Contents/MacOS/sidplay, 265): Library not loaded: @rpath/sidplayfp.framework/Versions/A/sidplayfp
  Referenced from: /Users/nevack/Library/Developer/Xcode/DerivedData/Cog-ffujrjjlvwctciftlnbjtlxqzdql/Build/Products/Debug/Cog.app/Contents/PlugIns/sidplay.bundle/Contents/MacOS/sidplay
  Reason: no suitable image found.  Did find:
	file system sandbox blocked open() of '/Users/nevack/Library/Developer/Xcode/DerivedData/Cog-ffujrjjlvwctciftlnbjtlxqzdql/Build/Products/Debug/sidplayfp.framework/Versions/A/sidplayfp'

@kode54 Quick googling shows that the error like this is only reproducible with free Apple Developer accounts. May I ask you to test build from this PR on your machine?

> The only error I see now on startup > > ``` > 2021-02-26 16:17:07.363432+0300 Cog[28758:137078] Error loading /Users/nevack/Library/Developer/Xcode/DerivedData/Cog-ffujrjjlvwctciftlnbjtlxqzdql/Build/Products/Debug/Cog.app/Contents/PlugIns/sidplay.bundle/Contents/MacOS/sidplay: dlopen(/Users/nevack/Library/Developer/Xcode/DerivedData/Cog-ffujrjjlvwctciftlnbjtlxqzdql/Build/Products/Debug/Cog.app/Contents/PlugIns/sidplay.bundle/Contents/MacOS/sidplay, 265): Library not loaded: @rpath/sidplayfp.framework/Versions/A/sidplayfp > Referenced from: /Users/nevack/Library/Developer/Xcode/DerivedData/Cog-ffujrjjlvwctciftlnbjtlxqzdql/Build/Products/Debug/Cog.app/Contents/PlugIns/sidplay.bundle/Contents/MacOS/sidplay > Reason: no suitable image found. Did find: > file system sandbox blocked open() of '/Users/nevack/Library/Developer/Xcode/DerivedData/Cog-ffujrjjlvwctciftlnbjtlxqzdql/Build/Products/Debug/sidplayfp.framework/Versions/A/sidplayfp' > ``` @kode54 Quick googling shows that the error like this is only reproducible with free Apple Developer accounts. May I ask you to test build from this PR on your machine?
nevack commented 2021-02-26 12:47:15 -03:00 (Migrated from github.com)

The only error I see now on startup

2021-02-26 16:17:07.363432+0300 Cog[28758:137078] Error loading /Users/nevack/Library/Developer/Xcode/DerivedData/Cog-ffujrjjlvwctciftlnbjtlxqzdql/Build/Products/Debug/Cog.app/Contents/PlugIns/sidplay.bundle/Contents/MacOS/sidplay:  dlopen(/Users/nevack/Library/Developer/Xcode/DerivedData/Cog-ffujrjjlvwctciftlnbjtlxqzdql/Build/Products/Debug/Cog.app/Contents/PlugIns/sidplay.bundle/Contents/MacOS/sidplay, 265): Library not loaded: @rpath/sidplayfp.framework/Versions/A/sidplayfp
  Referenced from: /Users/nevack/Library/Developer/Xcode/DerivedData/Cog-ffujrjjlvwctciftlnbjtlxqzdql/Build/Products/Debug/Cog.app/Contents/PlugIns/sidplay.bundle/Contents/MacOS/sidplay
  Reason: no suitable image found.  Did find:
	file system sandbox blocked open() of '/Users/nevack/Library/Developer/Xcode/DerivedData/Cog-ffujrjjlvwctciftlnbjtlxqzdql/Build/Products/Debug/sidplayfp.framework/Versions/A/sidplayfp'

@kode54 Quick googling shows that the error like this is only reproducible with free Apple Developer accounts. May I ask you to test build from this PR on your machine?

Added framework as dep to Cog target and the issue is gone.

> > The only error I see now on startup > > ``` > > 2021-02-26 16:17:07.363432+0300 Cog[28758:137078] Error loading /Users/nevack/Library/Developer/Xcode/DerivedData/Cog-ffujrjjlvwctciftlnbjtlxqzdql/Build/Products/Debug/Cog.app/Contents/PlugIns/sidplay.bundle/Contents/MacOS/sidplay: dlopen(/Users/nevack/Library/Developer/Xcode/DerivedData/Cog-ffujrjjlvwctciftlnbjtlxqzdql/Build/Products/Debug/Cog.app/Contents/PlugIns/sidplay.bundle/Contents/MacOS/sidplay, 265): Library not loaded: @rpath/sidplayfp.framework/Versions/A/sidplayfp > > Referenced from: /Users/nevack/Library/Developer/Xcode/DerivedData/Cog-ffujrjjlvwctciftlnbjtlxqzdql/Build/Products/Debug/Cog.app/Contents/PlugIns/sidplay.bundle/Contents/MacOS/sidplay > > Reason: no suitable image found. Did find: > > file system sandbox blocked open() of '/Users/nevack/Library/Developer/Xcode/DerivedData/Cog-ffujrjjlvwctciftlnbjtlxqzdql/Build/Products/Debug/sidplayfp.framework/Versions/A/sidplayfp' > > ``` > > @kode54 Quick googling shows that the error like this is only reproducible with free Apple Developer accounts. May I ask you to test build from this PR on your machine? Added framework as dep to Cog target and the issue is gone.
nevack (Migrated from github.com) reviewed 2021-02-26 14:18:08 -03:00
@ -2,9 +2,17 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.app-sandbox</key>
nevack (Migrated from github.com) commented 2021-02-26 14:18:08 -03:00

Permissions requested:

  1. Incoming Connections (http stream?)
  2. User's Music directory read-only access (play user's music)
  3. Drag&droped and opened files read-only access (play user's music)

I think this is sufficient for now.

Permissions requested: 1. Incoming Connections (http stream?) 2. User's Music directory read-only access (play user's music) 3. Drag&droped and opened files read-only access (play user's music) I think this is sufficient for now.
nevack commented 2021-02-26 17:06:03 -03:00 (Migrated from github.com)

Rebase + Conflict fix

Rebase + Conflict fix
kode54 (Migrated from github.com) reviewed 2021-02-26 20:25:07 -03:00
@ -2,9 +2,17 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.app-sandbox</key>
kode54 (Migrated from github.com) commented 2021-02-26 20:25:07 -03:00

Will also need to store bookmarks for those dragged and dropped or opened music files, unless the XML playlist is already sufficient for that.

Will also need to store bookmarks for those dragged and dropped or opened music files, unless the XML playlist is already sufficient for that.
kode54 commented 2021-02-26 20:52:44 -03:00 (Migrated from github.com)

I will make another commit to this branch that fixes libsidplayfp without moving it into the main app, by changing the install base path to match all other subproject Frameworks.

This doesn't fix Sandbox accessing files outside of the Music folder across executions. We need to resolve those using bookmarks or something.

I will make another commit to this branch that fixes libsidplayfp without moving it into the main app, by changing the install base path to match all other subproject Frameworks. This doesn't fix Sandbox accessing files outside of the Music folder across executions. We need to resolve those using bookmarks or something.
kode54 commented 2021-02-26 20:57:44 -03:00 (Migrated from github.com)

Hell with it, I don't know how to edit pull requests off the site, so I just merged it.

Hell with it, I don't know how to edit pull requests off the site, so I just merged it.
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: chris/Cog#116
No description provided.