keji
keji

Reputation: 5990

UIApplication openURL: Open Just iTunes App

How can I open up just the iTunes app. Not any subpages in the app like a song or video but just the app. Right now I am using: [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"itms://music"]]; but sometimes this gives an error saying invalid hostname: music. When I use [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"itms://"]]; I get bad URL.

Upvotes: 0

Views: 286

Answers (1)

Frank
Frank

Reputation: 3376

I have tested the following and it seems to be working fine

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"itms://?action=music"]];

Upvotes: 1

Related Questions