apple_bundle/entitlements/tv.rs
1use serde::{Deserialize, Serialize};
2
3/// TV
4#[derive(Serialize, Deserialize, Clone, Default, Debug, PartialEq, Eq)]
5pub struct Tv {
6 /// The entitlement for distinguishing between multiple user accounts on Apple TV.
7 ///
8 /// To configure the entitlement, add the User Management capability on your app’s
9 /// target in Xcode and select the checkbox for each privilege your app requires.
10 /// For more details about adding a capability, see Adding Capabilities to Your App.
11 ///
12 /// For guidance on choosing a data management strategy for your app, see
13 /// Personalizing Your App for Each User on Apple TV.
14 ///
15 /// ### Note
16 /// You can enable runs-as-current-user if your app’s minimum version is earlier than
17 /// tvOS 14, but the app will behave as if the privilege isn’t set when running on the
18 /// earlier version.
19 ///
20 /// ## Availability
21 /// * tvOS 13.0+
22 ///
23 /// ## Framework
24 /// * TV Services
25 #[serde(
26 rename = "com.apple.developer.user-management",
27 skip_serializing_if = "Option::is_none",
28 serialize_with = "crate::serialize_vec_enum_option"
29 )]
30 pub user_management: Option<Vec<UserManagement>>,
31 /// ## Availability
32 /// * iOS 10.0+
33 /// * macOS 10.14+
34 /// * tvOS 10.0+
35 ///
36 /// ## Framework
37 /// * Video Subscriber Account
38 #[serde(
39 rename = "com.apple.developer.video-subscriber-single-sign-on",
40 serialize_with = "crate::serialize_option",
41 skip_serializing_if = "Option::is_none"
42 )]
43 pub video_subscriber_single_sign_on: Option<bool>,
44 /// ## Availability
45 /// * iOS 10.0+
46 /// * macOS 10.14+
47 /// * tvOS 10.0+
48 ///
49 /// ## Framework
50 /// * Video Subscriber Account
51 #[serde(
52 rename = "com.apple.smoot.subscriptionservice",
53 serialize_with = "crate::serialize_option",
54 skip_serializing_if = "Option::is_none"
55 )]
56 pub smoot_subscriptionservice: Option<bool>,
57}
58
59/// User Management
60#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq)]
61pub enum UserManagement {
62 /// The value that grants access to TVUserManager, so you can map your own profiles to
63 /// users in the system.
64 #[serde(rename = "get-current-user")]
65 GetCurrentUser,
66 /// The value that grants access to a separate set of data for your app for each user
67 /// from GameCenter, iCloud, and local storage. Available in tvOS 14 or later.
68 #[serde(rename = "runs-as-current-user")]
69 RunsAsCurrentUser,
70}