Enable App Sandbox.
This commit is contained in:
parent
8105b9e2b2
commit
a8d6e6b7de
2 changed files with 8 additions and 24 deletions
|
@ -9,8 +9,6 @@
|
||||||
|
|
||||||
#import "AudioScrobbler.h"
|
#import "AudioScrobbler.h"
|
||||||
|
|
||||||
NSString *TrackNotification = @"com.apple.iTunes.playerInfo";
|
|
||||||
|
|
||||||
NSString *TrackArtist = @"Artist";
|
NSString *TrackArtist = @"Artist";
|
||||||
NSString *TrackAlbum = @"Album";
|
NSString *TrackAlbum = @"Album";
|
||||||
NSString *TrackTitle = @"Name";
|
NSString *TrackTitle = @"Name";
|
||||||
|
@ -147,13 +145,6 @@ typedef NS_ENUM(NSInteger, TrackStatus) { TrackPlaying, TrackPaused, TrackStoppe
|
||||||
- (void)performPlaybackDidBeginActions:(PlaylistEntry *)pe {
|
- (void)performPlaybackDidBeginActions:(PlaylistEntry *)pe {
|
||||||
if (NO == [pe error]) {
|
if (NO == [pe error]) {
|
||||||
entry = pe;
|
entry = pe;
|
||||||
|
|
||||||
[[NSDistributedNotificationCenter defaultCenter]
|
|
||||||
postNotificationName:TrackNotification
|
|
||||||
object:nil
|
|
||||||
userInfo:[self fillNotificationDictionary:pe status:TrackPlaying]
|
|
||||||
deliverImmediately:YES];
|
|
||||||
|
|
||||||
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
|
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
|
||||||
|
|
||||||
if ([defaults boolForKey:@"notifications.enable"]) {
|
if ([defaults boolForKey:@"notifications.enable"]) {
|
||||||
|
@ -284,33 +275,18 @@ typedef NS_ENUM(NSInteger, TrackStatus) { TrackPlaying, TrackPaused, TrackStoppe
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)performPlaybackDidPauseActions {
|
- (void)performPlaybackDidPauseActions {
|
||||||
[[NSDistributedNotificationCenter defaultCenter]
|
|
||||||
postNotificationName:TrackNotification
|
|
||||||
object:nil
|
|
||||||
userInfo:[self fillNotificationDictionary:entry status:TrackPaused]
|
|
||||||
deliverImmediately:YES];
|
|
||||||
if ([[NSUserDefaults standardUserDefaults] boolForKey:@"enableAudioScrobbler"]) {
|
if ([[NSUserDefaults standardUserDefaults] boolForKey:@"enableAudioScrobbler"]) {
|
||||||
[scrobbler pause];
|
[scrobbler pause];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)performPlaybackDidResumeActions {
|
- (void)performPlaybackDidResumeActions {
|
||||||
[[NSDistributedNotificationCenter defaultCenter]
|
|
||||||
postNotificationName:TrackNotification
|
|
||||||
object:nil
|
|
||||||
userInfo:[self fillNotificationDictionary:entry status:TrackPlaying]
|
|
||||||
deliverImmediately:YES];
|
|
||||||
if ([[NSUserDefaults standardUserDefaults] boolForKey:@"enableAudioScrobbler"]) {
|
if ([[NSUserDefaults standardUserDefaults] boolForKey:@"enableAudioScrobbler"]) {
|
||||||
[scrobbler resume];
|
[scrobbler resume];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)performPlaybackDidStopActions {
|
- (void)performPlaybackDidStopActions {
|
||||||
[[NSDistributedNotificationCenter defaultCenter]
|
|
||||||
postNotificationName:TrackNotification
|
|
||||||
object:nil
|
|
||||||
userInfo:[self fillNotificationDictionary:entry status:TrackStopped]
|
|
||||||
deliverImmediately:YES];
|
|
||||||
entry = nil;
|
entry = nil;
|
||||||
if ([[NSUserDefaults standardUserDefaults] boolForKey:@"enableAudioScrobbler"]) {
|
if ([[NSUserDefaults standardUserDefaults] boolForKey:@"enableAudioScrobbler"]) {
|
||||||
[scrobbler stop];
|
[scrobbler stop];
|
||||||
|
|
|
@ -2,9 +2,17 @@
|
||||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
<plist version="1.0">
|
<plist version="1.0">
|
||||||
<dict>
|
<dict>
|
||||||
|
<key>com.apple.security.app-sandbox</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.security.assets.music.read-only</key>
|
||||||
|
<true/>
|
||||||
<key>com.apple.security.cs.allow-jit</key>
|
<key>com.apple.security.cs.allow-jit</key>
|
||||||
<true/>
|
<true/>
|
||||||
<key>com.apple.security.cs.disable-library-validation</key>
|
<key>com.apple.security.cs.disable-library-validation</key>
|
||||||
<true/>
|
<true/>
|
||||||
|
<key>com.apple.security.files.user-selected.read-only</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.security.network.client</key>
|
||||||
|
<true/>
|
||||||
</dict>
|
</dict>
|
||||||
</plist>
|
</plist>
|
||||||
|
|
Loading…
Reference in a new issue