共用方式為


在 Xamarin 中使用 watchOS 應用程式群組

「應用程式群組」可讓不同的應用程式 (或應用程式及其擴充功能) 存取共用檔案儲存體位置。 「應用程式群組」可用於資料下列資料:

設定應用程式群組

共用位置是使用應用程式群組來設定,此群組是在iOS 開發人員中心上的 [憑證]、[標識符和配置檔] 區段中設定。 每個專案的 Entitlements.plist 中也必須參考此值。

佈建

應用程式群組會有標識碼,通常是具有前置詞的 group. 套件組合標識符。 例如,我們可以使用套件組合識別碼 com.xamarin.WatchSettings 和應用程式群組 group.com.xamarin.WatchSettings

Use the Bundle ID com.xamarin.WatchSettings and the app group group.com.xamarin.WatchSettings

Entitlements.plist

除了設定布建設定檔,請在 Entitlements.plist啟用應用程式群組,然後輸入您選擇的標識碼:

Configure the plist and enter the ID

部署

請確定您在部署布建中正確設定應用程式群組。

如需詳細資訊,請參閱 應用程式群組功能 檔。