I'm trying to control the active music player from my app to skip the currently playing song. I'm able to do it for the iPod music player with
MPMusicPlayerController *musicPlayer = [MPMusicPlayerController systemMusicPlayer];
[musicPlayer skipToNextItem];
The problem is that i would like to control the Spotify app, or any other music app currently playing. Since they can be controlled with the control on the lock screen i though there might be a way to do it. I thought a solution was to post a UIEventSubtypeRemoteControlNextTrack notification, but i can't found how to build a UIEvent notification. Has anyone already solved something like that ?
Thanks