In objective c, I've been using code like this to update MPNowPlayingInfoCenter:
[[MPNowPlayingInfoCenter defaultCenter] setNowPlayingInfo:
@{ MPMediaItemPropertyArtist : @"Artist!",
MPMediaItemPropertyTitle : @"Title! }];
But in Swift, it doesn't seem like the function "setNowPlayingInfo" is recognized:
MPNowPlayingInfoCenter.defaultCenter().... // Can't identify 'setNowPlayingInfo()'
Is there anything I'm missing?
MPNowPlayingInfoCenter.defaultCenter().nowPlayingInfo = [MPMediaItemPropertyArtist : "Artist!", MPMediaItemPropertyTitle : "Title!]
, setters/getters behave quite differently in Swift from ObjC – Stopgap