在iOS应用中跳转到AppStore

来源:互联网 发布:前端后端数据库的关系 编辑:程序博客网 时间:2024/05/22 12:32

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>



0 0
原创粉丝点击