Enable App Sandbox. #116

Merged
nevack merged 3 commits from nevack/sandbox into master 2021-02-26 20:56:24 -03:00
2 changed files with 8 additions and 24 deletions
Showing only changes of commit a8d6e6b7de - Show all commits

View file

@ -9,8 +9,6 @@
#import "AudioScrobbler.h"
NSString *TrackNotification = @"com.apple.iTunes.playerInfo";
NSString *TrackArtist = @"Artist";
NSString *TrackAlbum = @"Album";
NSString *TrackTitle = @"Name";
@ -147,13 +145,6 @@ typedef NS_ENUM(NSInteger, TrackStatus) { TrackPlaying, TrackPaused, TrackStoppe
- (void)performPlaybackDidBeginActions:(PlaylistEntry *)pe {
if (NO == [pe error]) {
entry = pe;
[[NSDistributedNotificationCenter defaultCenter]
postNotificationName:TrackNotification
object:nil
userInfo:[self fillNotificationDictionary:pe status:TrackPlaying]
deliverImmediately:YES];
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
if ([defaults boolForKey:@"notifications.enable"]) {
@ -284,33 +275,18 @@ typedef NS_ENUM(NSInteger, TrackStatus) { TrackPlaying, TrackPaused, TrackStoppe
}
- (void)performPlaybackDidPauseActions {
[[NSDistributedNotificationCenter defaultCenter]
postNotificationName:TrackNotification
object:nil
userInfo:[self fillNotificationDictionary:entry status:TrackPaused]
deliverImmediately:YES];
if ([[NSUserDefaults standardUserDefaults] boolForKey:@"enableAudioScrobbler"]) {
[scrobbler pause];
}
}
- (void)performPlaybackDidResumeActions {
[[NSDistributedNotificationCenter defaultCenter]
postNotificationName:TrackNotification
object:nil
userInfo:[self fillNotificationDictionary:entry status:TrackPlaying]
deliverImmediately:YES];
if ([[NSUserDefaults standardUserDefaults] boolForKey:@"enableAudioScrobbler"]) {
[scrobbler resume];
}
}
- (void)performPlaybackDidStopActions {
[[NSDistributedNotificationCenter defaultCenter]
postNotificationName:TrackNotification
object:nil
userInfo:[self fillNotificationDictionary:entry status:TrackStopped]
deliverImmediately:YES];
entry = nil;
if ([[NSUserDefaults standardUserDefaults] boolForKey:@"enableAudioScrobbler"]) {
[scrobbler stop];

View file

@ -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 commented 2021-02-26 14:18:08 -03:00 (Migrated from github.com)
Review

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.
kode54 commented 2021-02-26 20:25:07 -03:00 (Migrated from github.com)
Review

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.
<true/>
<key>com.apple.security.assets.music.read-only</key>
<true/>
<key>com.apple.security.cs.allow-jit</key>
<true/>
<key>com.apple.security.cs.disable-library-validation</key>
<true/>
<key>com.apple.security.files.user-selected.read-only</key>
<true/>
<key>com.apple.security.network.client</key>
<true/>
</dict>
</plist>