博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
ios或mac程序中添加链接到评价页面的方法
阅读量:4200 次
发布时间:2019-05-26

本文共 4477 字,大约阅读时间需要 14 分钟。

Dissecting iTunes, App Store and Mac App Store links

For the latest release of , we wanted to include two buttons: one that linked to all our apps on the App Store, and another that let users easily write a review on iTunes.

These both seem like common things iOS developers would want to do, so we decided to share the results of our research. Some of the information contained below is obvious for experienced iTunes users, while other links are rarer.

Copying links from iTunes

Most links can be copied directly from iTunes. Simply right click (Mac & PC) or control-click (Mac) on a button or linked text in iTunes and select Copy Link.

 — App Store home
 — Games
 — Utilities
 — An app

These links all function as you’d expect on a Mac, PC, iPad, iPhone and iPod.

iTunes Link Maker

Apple provide a great tool for creating iTunes links, aptly named . It lets you create all kinds of URLs, including a direct link to an artist.

On Mac or Windows, this link will open your web browser (if you're not already in it), then open iTunes and the artist’s page (The Chemical Brothers, in this case). On an iOS device, the link opens iTunes and loads the artist’s page. iTunes Link Maker tool also lets you create a link to a developer’s apps.

The link functions as expected on iTunes for Mac and Windows, opening up the developer’s page. Unfortunately, it doesn’t work on iOS devices—it opens the iTunes app then gives an error. This is probably because the App Store app doesn’t actually have a page that lists all apps by a developer.

There is a way around the problem though.

Searching and linking with iTunes.com

iTunes.com URLs provide a great method for jumping to search results or directly to an item. If the search produces multiple results, you’ll land on a search results page. If the search produces a single result, then you’ll be taken directly to the item.

 — Search for search

This searches for songs, movies, TV shows, artists, developers or any item on the iTunes Store. If the name of the item you’re linking to contains spaces or punctuation, you’ll need to strip them out. You might have issues using this method to link to a single item for common names, as they’ll yield multiple results (try a search for “” or “” if you don’t believe me).

 — Link to song by artist
 — Link to album by artist
 — Search for moviename
 — Search for tvshow
 — Link to app
 — Link to app by developer

Using specific URLs is more likely to produce one result, ending up where you intended.

 — Search for all apps by developer

It’s also possible to link to all apps by one developer, but there’s a catch. On a Mac or a PC, this will open iTunes and land on a developer’s page. On an iOS device it’ll do a bit of a dance, opening MobileSafari, then iTunes, then the App Store app. Not ideal, a bit ugly and slow, but it gets there in the end.

If you’d like to hide the redirections and speed up the process,  using NSURLConnection.

Mac App Store updates

To open the Mac App Store app and select the Updates tab, use the URL below.

Heading straight to a review form

It’s also possible to send someone straight to the review form for an app.

Simply replace the ID with your app’s ID to create a URL for your app.

On a desktop or laptop, this will take you directly to the review form in iTunes for the app or item. On an iOS device, this will open MobileSafari, then open iTunes or the App Store app on the reviews page, leaving the user only one tap away from writing a review.

Update: iOS 4.2 seems to have fixed this and links now open the App Store app directly.

To find out an item’s ID, right (Mac & PC) or control-click (Mac) on a link to the item in iTunes and select Copy Link. The result will look something like this.


The ID is the number in the URL after “id’.

It might be worth noting that this URL was created using iTunes 8. I don't think there’s a way to create review links in iTunes 9, so maybe this URL is being phased out. Use with caution.

Update:  has provided an alternative review link for apps. Please note that it only works on iOS devices.

Linking to a specific promo code

To create a direct link to open iTunes and redeem a , replace the “RWAPJ7XLTHN7” portion of the URL below with your promo code.

Hat tip to  for .

Final results

And the winners are...

 — Search for all our apps

 — Go to Consume’s review form

Due to some of the redirecting that takes place on an iOS, using URL shorteners can break links. So, be sure to check before using them on Twitter or Facebook.

转载地址:http://gwbli.baihongyu.com/

你可能感兴趣的文章
JAX-RS(java restful实现讲解)(转)
查看>>
Spring MVC与JAX-RS比较与分析
查看>>
openstack官方docker介绍
查看>>
头痛与早餐
查看>>
[转]在ASP.NET 2.0中操作数据::创建一个数据访问层
查看>>
Linux命令之chmod详解
查看>>
【java小程序实战】小程序注销功能实现
查看>>
Java中子类能否继承父类的私有属性和方法
查看>>
JVM内存模型详解
查看>>
(二)Git--工作区和暂存区、管理修改与撤销
查看>>
(七)Git--自定义Git
查看>>
(五)Git--分支管理
查看>>
(四)Git--远程仓库
查看>>
(六) Git--标签管理
查看>>
java中继承,子类是否继承父类的构造函数
查看>>
什么是Spring Cloud ?
查看>>
pyqt实现界面化编程
查看>>
qt写DLL文件并调用和出现的问题分析
查看>>
工厂模式(Factory)-设计模式(一)
查看>>
建造者模式(Builder)-设计模式(三)
查看>>