categories

categories 清單成員允許您為您的 Web 應用指定一個或多個分類。這些類別有助於使用者在應用商店中發現您的應用。

注意:categories 成員是可選的,應用商店在展示您的應用時可能會使用不同的值。

語法

json
/* Single category */
"categories": ["productivity"]

/* Multiple categories */
"categories": ["productivity", "utilities", "social"]

categories

一個由逗號分隔的字串組成的陣列,其中每個字串代表一個類別名稱。字串應為小寫。W3C 維護著一個標準化類別列表,其中包含常用值,例如 business(商務)、education(教育)、entertainment(娛樂)、finance(金融)、games(遊戲)和 productivity(生產力)。

描述

categories 成員是補充性元資料,不影響應用的執行時行為或瀏覽器如何展示應用。其值僅用於應用商店和其他分發平臺,在瀏覽器或已安裝的應用中對使用者是不可見的。

如果您的應用有多種用途,指定多個相關類別可以幫助使用者在應用商店的不同部分發現您的應用。

如果未指定 categories 或指定的值未被使用,應用商店將根據其自己的分類系統對您的 Web 應用進行分類。

下面來自 Apple App Store 的圖片顯示了類別在應用商店不同部分中的顯示方式。應用概覽在“CHART”(圖表)欄位(高亮顯示)中顯示了類別以及應用在該類別中的排名,而“Information”(資訊)部分則將“Category”(類別)顯示為一個專用欄位(高亮顯示)。

  • BBC 應用被歸類為“News”(新聞)

    BBC app overview in Apple App Store. CHART field is circled in red to show News category. BBC app Information section with the Category field circled in red showing News.
  • The Weather Channel 應用被歸類為“Weather”(天氣)

    Weather app overview in Apple App Store. CHART field is circled in red to show Weather category Weather app Information section with the Category field circled in red showing Weather

示例

對膳食計劃 Web 應用進行分類

此示例展示瞭如何根據可用食材對用於計劃膳食的 Web 應用進行分類

json
{
  "name": "Meal Planner",
  "categories": ["food", "health", "lifestyle"]
}

規範

規範
Web 應用清單 - 應用資訊
# categories-member

瀏覽器相容性

categories 清單成員由應用商店在釋出和列出 Web 應用時使用,因此瀏覽器相容性不適用。雖然瀏覽器可能會解析此成員,但它是可選的,並且不影響應用的功能展示