//到Safari
NSString*url =@"http://www.baidu.com";//把http://带上
[[UIApplicationsharedApplication]openURL:[NSURLURLWithString:url]];
//到App Store
NSString* appstoreUrlString =@"itms-apps://itunes.apple.com/cn/app/hun-lian-dui-xiang/id1096497249?mt=8";//appstore中的地址,稍作修改
NSURL* url = [NSURLURLWithString:appstoreUrlString];
if([[UIApplicationsharedApplication]canOpenURL:url])
{
[[UIApplicationsharedApplication]openURL:url];
}
else
{
NSLog(@"can not open");
}
//评价APP
NSString*appstoreUrlString = [NSStringstringWithFormat:
@"itms-apps://itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?type=Purple+Software&id=%@",
m_appleID];//m_appleID是你的app在itunes connect上面的id
NSURL* url = [NSURLURLWithString:appstoreUrlString];
if([[UIApplicationsharedApplication]canOpenURL:url])
{
[[UIApplicationsharedApplication]openURL:url];
}
else
{
NSLog(@"can not open");
}
网友评论
https://www.cnblogs.com/PaulpauL/p/9509586.html