//应用 URL Schemes
NSURL *url = [NSURL URLWithString:@"xxxxxx://"];
if([[UIApplication sharedApplication] canOpenURL:url]) {
//打开url
[[UIApplication sharedApplication] openURL:url];
}else {
NSLog(@"app store下载");
//App Store应用id
NSString *appID = @"1225825711";
//调到App Store应用界面
// NSString *str1 = [NSString stringWithFormat:@"http://itunes.apple.com/us/app/id%@",appID];
// [[UIApplication sharedApplication] openURL:[NSURL URLWithString:str1]];
//跳转到评价页面
NSString *str2 = [NSString stringWithFormat:@"itms-apps://itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?type=Purple+Software&onlyLatestVersion=true&pageNumber=0&sortOrdering=1&id=%@",appID];
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:str2]];
}App跳转
最新推荐文章于 2025-05-30 20:09:10 发布
本文介绍如何在iOS应用中实现自定义URL Scheme跳转功能,并提供了当应用未安装时引导用户前往App Store下载及查看评价的具体实现方法。
1139

被折叠的 条评论
为什么被折叠?



