首页 > 代码库 > 在iOS应用中跳转到AppStore

在iOS应用中跳转到AppStore

1.找到应用程序的描述链接,比如:

https://57324.api-01.com/serve?action=click&publisher_id=57324&site_id=48830

2.然后将 http:// 替换为 itms:// 或者 itms-apps:// ,如下:

itms://57324.api-01.com/serve?action=click&publisher_id=57324&site_id=48830

itms-apps://57324.api-01.com/serve?action=click&publisher_id=57324&site_id=48830

3.关联方法,在方法中调用下面方法

<span style="font-size:18px;">[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"itms://57324.api-01.com/serve?action=click&publisher_id=57324&site_id=48830"]];</span>

<span style="font-size:18px;">[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"itms-apps://57324.api-01.com/serve?action=click&publisher_id=57324&site_id=48830"]];</span>



在iOS应用中跳转到AppStore