Here is how you can open default Phone app, SMS app, Email app, Maps app and browser app with openURL.
Open default Phone app in iPhone:
1
|
Open default SMS app in iPhone:
1
|
Open default Email app in iPhone:
1
| [[UIApplication sharedApplication] openURL:[ NSURL URLWithString: @"mailto://devprograms@apple.com" ]]; |
Open default Maps app in iPhone:
1
2
3
4
5
6
7
8
9
10
11
| NSString * addressText = @"1 Infinite Loop, Cupertino, CA 95014" ; // URL encode the spaces addressText = [addressText stringByAddingPercentEscapesUsingEncoding: NSASCIIStringEncoding ]; // lets throw this text on the log so we can view the url in the event we have an issue [[UIApplication sharedApplication] openURL:[ NSURL URLWithString:urlText]]; |
Open default Browser app in iPhone:
1
|
No comments:
Post a Comment