From a8d6e6b7de028d317cc4bdfd5e013305c79c6735 Mon Sep 17 00:00:00 2001 From: Dzmitry Neviadomski Date: Fri, 26 Feb 2021 16:00:22 +0300 Subject: [PATCH] Enable App Sandbox. --- Application/PlaybackEventController.m | 24 ------------------------ Cog.entitlements | 8 ++++++++ 2 files changed, 8 insertions(+), 24 deletions(-) diff --git a/Application/PlaybackEventController.m b/Application/PlaybackEventController.m index 067076bba..b855e9ed6 100644 --- a/Application/PlaybackEventController.m +++ b/Application/PlaybackEventController.m @@ -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]; diff --git a/Cog.entitlements b/Cog.entitlements index 461123ca3..d4c288c58 100644 --- a/Cog.entitlements +++ b/Cog.entitlements @@ -2,9 +2,17 @@ + com.apple.security.app-sandbox + + com.apple.security.assets.music.read-only + com.apple.security.cs.allow-jit com.apple.security.cs.disable-library-validation + com.apple.security.files.user-selected.read-only + + com.apple.security.network.client +