From d9eb313c1b2ab15fa9a5bc5269ac9b8d396f7580 Mon Sep 17 00:00:00 2001 From: David Chavez Date: Tue, 28 Sep 2021 10:57:36 +0200 Subject: [PATCH] Deprecate syncRemoteCommandsWithCommandCenter --- SwiftAudioEx/Classes/AudioPlayer.swift | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/SwiftAudioEx/Classes/AudioPlayer.swift b/SwiftAudioEx/Classes/AudioPlayer.swift index 4787eb5..6504825 100755 --- a/SwiftAudioEx/Classes/AudioPlayer.swift +++ b/SwiftAudioEx/Classes/AudioPlayer.swift @@ -240,6 +240,15 @@ public class AudioPlayer: AVPlayerWrapperDelegate { self.enableRemoteCommands(remoteCommands) } } + + /** + Syncs the current remoteCommands with the iOS command center. + Can be used to update item states - e.g. like, dislike and bookmark. + */ + @available(*, deprecated, message: "Directly set .remoteCommands instead") + public func syncRemoteCommandsWithCommandCenter() { + self.enableRemoteCommands(remoteCommands) + } // MARK: - NowPlayingInfo