This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo gem uninstall cocoapods | |
sudo gem install cocoapods -v 1.1.1 | |
rm -rf "${HOME}/Library/Caches/CocoaPods" | |
rm -rf Pods | |
pod update |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// listening for current item change | |
self.audioQueueObserver = self.playerQueue?.observe(\.currentItem, options: [.new]) { | |
[weak self] (player, _) in | |
print("media item changed...") | |
} | |
// listening for current item status change | |
self.audioQueueStatusObserver = self.playerQueue?.currentItem?.observe(\.status, options: [.new, .old], changeHandler: { | |
(playerItem, change) in | |
if playerItem.status == .readyToPlay { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
struct AnyError: Error { | |
let error: Error | |
init(_ error: Error) { | |
self.error = error | |
} | |
} |