iOS: Launch the Music application from your app

Music Icon

In an iOS application I am working on I found the need to be able to launch Apple’s Music player application. After googling a lot and posting to a developer email list, I found no solutions. I was however pointed to a wiki that lists iPhone URL schemes [link]. This shows various ways to call up other applications on iOS devices. However the Music application isn’t listed there.

I took a shot in the dark and tried “music:” – and it works :)

NSString *stringURL = @"music:";
NSURL *url = [NSURL URLWithString:stringURL];
[[UIApplication sharedApplication] openURL:url];

So now you know too.

Related Posts Plugin for WordPress, Blogger...

Leave a Reply

Your email address will not be published. Required fields are marked *


three + 4 =

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>