Remote control events work fine with CocoaLibSpotify without any modifications to the library at all, but only on the device and not in the Simulator (including iOS7's Control Center).
Taking the Simple Player example, I made the following changes:
Changed
Simple_PlayerAppDelegate
to be a subclass ofUIResponder
.Overrode
canBecomeFirstResponder:
to returnYES
.Implemented
remoteControlReceivedWithEvent:
.In the callback to the
playTrack:
call to CocoaLibSpotify, added:[[UIApplication sharedApplication] beginReceivingRemoteControlEvents];
[self becomeFirstResponder];
These changes allowed Simple Player to receive remote control events when running on a device.