IOS: OpenURL method of the UIApplication class
1. Call the app store Interface
In actual development, we often recommend other applications and recommend our own paid software, so we need to directly connect to the corresponding page of the app store in the program.
The actual method is very simple. The OpenURL method of the UIApplication class is used:
[[UIApplication sharedApplication] openURL: [NSURL URLWithString: @ "program connection"];
2. Call methods of other applications
// Call the built-in mail
[[UIApplicationsharedApplication] openURL: [NSURLURLWithString: @ "mailto: // admin@hzlzh.com"];
// Call the phone number
[[UIApplication sharedApplication] openURL: [NSURLURLWithString: @ "tel: // 8008808888"];
// Call SMS
[[UIApplicationsharedApplication] openURL: [NSURL URLWithString: @ "sms: // 800888"];
// Call the self-contained browser safari
[[UIApplicationsharedApplication] openURL: [NSURLURLWithString: @ "http://www.hzlzh.com"];
// Call Remote
[[UIApplicationsharedApplication] openURL: [NSURL URLWithString: @ "remote: // fff"];
You can call phone to pass the number. You can call SMS to set only the number and Cannot initialize the SMS content.