iOS6之Smart App Banners推送APP新功能

來源:互聯網
上載者:User

iOS6新標籤apple-itunes-app提供了一個叫 Smart App Banners的功能, 當你在iOS移動平台訪問一個網站時,會提示你去App Store下載這個網站的官方App。

Smart App Banners自動識別使用者裝置是否支援該應用APP,如果裝置不相容,則下載廣告條不會顯示。
文法格式為:

 meta name="apple-itunes-app" content="app-id=myAppStoreID, affiliate-data=myAffiliateData, app-argument=myURL"> <meta name="apple-itunes-app" content="app-id=myAppStoreID, affiliate-data=myAffiliateData, app-argument=myURL">


其中ID為必選。 App ID (required), Affiliate Data (Optional), Argument (Optional) 。

app-id是APP的唯一標識,查詢app ID的方法: 訪問iTunes Link Maker 在搜尋方塊輸入應用程式名稱,選擇國家和類型, 在搜尋結果列表頁面右側,點擊 iPhone App Link,跳轉的URL中id 和 ?mt之間的9為數字就是這個APP的唯一ID。

其他可選屬性的介紹:


affiliate-data: (Optional.) Your iTunes affiliate string, if you are an iTunes affiliate. If you are not, find out more about becoming an iTunes affiliate at  app-argument: (Optional.) A URL that provides context to your native app. If you include this, and the user has your app installed, she can jump from your website to the corresponding position in your iOS app. Typically, it is beneficial to retain navigational context because:

If the user is deep within the navigational hierarchy of your website, you can pass the document’s entire URL, and then parse it in your app to reroute her to the correct location in your app.

If the user performs a search on your website, you can pass the query string so that she can seamlessly continue the search in your app without having to retype her query.

If the user is in the midst of creating content, you can pass the session ID to download the web session state in your app so she can nondestructively resume her work.

You can generate the app-argument of each page dynamically with a server-side script. You can format it however you'd like, as long as it is a valid URL.

格式參考推特的寫法:


 

 meta name="apple-itunes-app" content="app-id=333903271, app-argument=twitter://timeline, affiliate-data=partnerId=30&siteID=UkOLawSuc90&u1=tw-

44c06a9f3dde70bac326583e550d2f3dafd9cf56a0f96e6e639cf2155"> 

<meta name="apple-itunes-app" content="app-id=333903271, app-argument=twitter://timeline, affiliate-data=partnerId=30&siteID=UkOLawSuc90&u1=tw-44c06a9f3dde70bac326583e550d2f3dafd9cf56a0f96e6e639cf2155">


需要注意的是Smart App Banners標籤不能用在frame架構內部,否則不起作用。

 

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.