2011年2月22日 星期二

Launching the App Store from an iPhone application

在APP中啟動App Store的作法.

來源:官方Q&A 1629


  1. Launch iTunes on your computer.
  2. Search for the item you want to link to.
  3. Right-click or control-click on the item's name in iTunes, then choose "Copy iTunes Store URL" from the pop-up menu.
  4. Open the modified URL using an NSURL object and the -[UIApplication openURL] method.


簡單說就是從iTunes內的App Store內找到要連結的APP.
從APP頁面上在APP的名稱上按右鍵,選"拷貝連結".
在程式中建立NSURL物件,使用拷貝的連結做為內容,
再使用  -[UIApplication openURL] 啟動.

沒有留言:

張貼留言