[Sandbox] Disable distributed iTunes notification

This notification can't escape the sandbox anyway, and I forgot to
remove it after adding the app sandbox code again.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
swiftingly
Christopher Snowhill 2022-06-20 16:43:21 -07:00
parent 9dbe0a0d3e
commit 9d559481d3
1 changed files with 12 additions and 0 deletions

View File

@ -9,6 +9,7 @@
#import "PlaylistEntry.h"
#if 0
NSString *TrackNotification = @"com.apple.iTunes.playerInfo";
NSString *TrackArtist = @"Artist";
@ -23,6 +24,7 @@ NSString *TrackState = @"Player State";
typedef NS_ENUM(NSInteger, TrackStatus) { TrackPlaying,
TrackPaused,
TrackStopped };
#endif
@implementation PlaybackEventController {
NSOperationQueue *queue;
@ -105,6 +107,7 @@ didReceiveNotificationResponse:(UNNotificationResponse *)response
}
}
#if 0
- (NSDictionary *)fillNotificationDictionary:(PlaylistEntry *)pe status:(TrackStatus)status {
NSMutableDictionary *dict = [NSMutableDictionary dictionary];
if(pe == nil || pe.deLeted || pe.url == nil) return dict;
@ -140,16 +143,19 @@ didReceiveNotificationResponse:(UNNotificationResponse *)response
return dict;
}
#endif
- (void)performPlaybackDidBeginActions:(PlaylistEntry *)pe {
if(NO == [pe error]) {
entry = pe;
#if 0
[[NSDistributedNotificationCenter defaultCenter]
postNotificationName:TrackNotification
object:nil
userInfo:[self fillNotificationDictionary:pe status:TrackPlaying]
deliverImmediately:YES];
#endif
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
@ -283,27 +289,33 @@ didReceiveNotificationResponse:(UNNotificationResponse *)response
}
- (void)performPlaybackDidPauseActions {
#if 0
[[NSDistributedNotificationCenter defaultCenter]
postNotificationName:TrackNotification
object:nil
userInfo:[self fillNotificationDictionary:entry status:TrackPaused]
deliverImmediately:YES];
#endif
}
- (void)performPlaybackDidResumeActions {
#if 0
[[NSDistributedNotificationCenter defaultCenter]
postNotificationName:TrackNotification
object:nil
userInfo:[self fillNotificationDictionary:entry status:TrackPlaying]
deliverImmediately:YES];
#endif
}
- (void)performPlaybackDidStopActions {
#if 0
[[NSDistributedNotificationCenter defaultCenter]
postNotificationName:TrackNotification
object:nil
userInfo:[self fillNotificationDictionary:entry status:TrackStopped]
deliverImmediately:YES];
#endif
entry = nil;
}