how to navigate to music-player of iPhone from my application in iOS using objective-c?
Asked
Active
Viewed 101 times
0
-
2What do you mean "navigate" ? Open Music.app ? Have controls to do next/previous/pause ? – Larme Apr 26 '16 at 11:30
-
yes i want to open default music player. – Jagdeep Singh Apr 26 '16 at 12:10
3 Answers
0
you can do like this
if ([[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@"music://"]])
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"music://"]];
for iOS9 you need to integrate the LSApplicationQueriesSchemes in your .plist also , ref this link once
Community
- 1
- 1
Anbu.Karthik
- 82,064
- 23
- 174
- 143
0
You can open apps from your app by using iphone URL Schemes.
NSString *stringURL = @"music:";
NSURL *url = [NSURL URLWithString:stringURL];
[[UIApplication sharedApplication] openURL:url];
Check this Iphone_URL_Scheme post for more details. it have great explanation to how to open app from own app.
Hope this will help :)
Ketan Parmar
- 27,092
- 9
- 50
- 75