fastlane 2.186.0 → 2.187.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (90) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +86 -86
  3. data/fastlane/lib/fastlane/actions/create_keychain.rb +5 -2
  4. data/fastlane/lib/fastlane/actions/docs/build_app.md +1 -1
  5. data/fastlane/lib/fastlane/actions/docs/capture_android_screenshots.md +25 -26
  6. data/fastlane/lib/fastlane/actions/docs/capture_ios_screenshots.md +2 -2
  7. data/fastlane/lib/fastlane/actions/docs/create_app_online.md +171 -67
  8. data/fastlane/lib/fastlane/actions/latest_testflight_build_number.rb +3 -4
  9. data/fastlane/lib/fastlane/actions/lcov.rb +0 -4
  10. data/fastlane/lib/fastlane/actions/mailgun.rb +21 -27
  11. data/fastlane/lib/fastlane/actions/make_changelog_from_jenkins.rb +1 -1
  12. data/fastlane/lib/fastlane/actions/modify_services.rb +59 -24
  13. data/fastlane/lib/fastlane/actions/nexus_upload.rb +2 -2
  14. data/fastlane/lib/fastlane/actions/notarize.rb +1 -4
  15. data/fastlane/lib/fastlane/actions/number_of_commits.rb +1 -1
  16. data/fastlane/lib/fastlane/actions/oclint.rb +15 -14
  17. data/fastlane/lib/fastlane/actions/pod_push.rb +0 -2
  18. data/fastlane/lib/fastlane/actions/podio_item.rb +0 -7
  19. data/fastlane/lib/fastlane/actions/prompt.rb +3 -4
  20. data/fastlane/lib/fastlane/actions/push_git_tags.rb +1 -1
  21. data/fastlane/lib/fastlane/actions/puts.rb +1 -2
  22. data/fastlane/lib/fastlane/actions/register_devices.rb +0 -1
  23. data/fastlane/lib/fastlane/actions/reset_git_repo.rb +5 -8
  24. data/fastlane/lib/fastlane/actions/reset_simulator_contents.rb +0 -2
  25. data/fastlane/lib/fastlane/actions/resign.rb +2 -9
  26. data/fastlane/lib/fastlane/actions/rsync.rb +3 -6
  27. data/fastlane/lib/fastlane/actions/run_tests.rb +1 -1
  28. data/fastlane/lib/fastlane/actions/s3.rb +1 -1
  29. data/fastlane/lib/fastlane/actions/say.rb +2 -3
  30. data/fastlane/lib/fastlane/actions/scp.rb +4 -10
  31. data/fastlane/lib/fastlane/actions/set_build_number_repository.rb +1 -1
  32. data/fastlane/lib/fastlane/actions/set_changelog.rb +1 -1
  33. data/fastlane/lib/fastlane/actions/set_github_release.rb +2 -8
  34. data/fastlane/lib/fastlane/actions/set_info_plist_value.rb +1 -1
  35. data/fastlane/lib/fastlane/actions/set_pod_key.rb +3 -4
  36. data/fastlane/lib/fastlane/actions/setup_ci.rb +1 -2
  37. data/fastlane/lib/fastlane/actions/setup_circle_ci.rb +1 -1
  38. data/fastlane/lib/fastlane/actions/setup_jenkins.rb +7 -12
  39. data/fastlane/lib/fastlane/actions/setup_travis.rb +1 -1
  40. data/fastlane/lib/fastlane/actions/sh.rb +2 -4
  41. data/fastlane/lib/fastlane/actions/slack.rb +6 -8
  42. data/fastlane/lib/fastlane/actions/slather.rb +3 -19
  43. data/fastlane/lib/fastlane/actions/sonar.rb +12 -19
  44. data/fastlane/lib/fastlane/actions/sourcedocs.rb +62 -98
  45. data/fastlane/lib/fastlane/actions/splunkmint.rb +2 -2
  46. data/fastlane/lib/fastlane/actions/spm.rb +3 -3
  47. data/fastlane/lib/fastlane/actions/ssh.rb +5 -10
  48. data/fastlane/lib/fastlane/actions/testfairy.rb +0 -1
  49. data/fastlane/lib/fastlane/actions/tryouts.rb +2 -3
  50. data/fastlane/lib/fastlane/actions/twitter.rb +0 -5
  51. data/fastlane/lib/fastlane/actions/unlock_keychain.rb +3 -3
  52. data/fastlane/lib/fastlane/actions/update_app_group_identifiers.rb +1 -4
  53. data/fastlane/lib/fastlane/actions/update_code_signing_settings.rb +8 -15
  54. data/fastlane/lib/fastlane/actions/update_fastlane.rb +2 -2
  55. data/fastlane/lib/fastlane/documentation/docs_generator.rb +1 -1
  56. data/fastlane/lib/fastlane/version.rb +1 -1
  57. data/fastlane/swift/Deliverfile.swift +1 -1
  58. data/fastlane/swift/DeliverfileProtocol.swift +1 -1
  59. data/fastlane/swift/Fastlane.swift +57 -57
  60. data/fastlane/swift/Gymfile.swift +1 -1
  61. data/fastlane/swift/GymfileProtocol.swift +1 -1
  62. data/fastlane/swift/Matchfile.swift +1 -1
  63. data/fastlane/swift/MatchfileProtocol.swift +1 -1
  64. data/fastlane/swift/Precheckfile.swift +1 -1
  65. data/fastlane/swift/PrecheckfileProtocol.swift +1 -1
  66. data/fastlane/swift/Scanfile.swift +1 -1
  67. data/fastlane/swift/ScanfileProtocol.swift +1 -1
  68. data/fastlane/swift/Screengrabfile.swift +1 -1
  69. data/fastlane/swift/ScreengrabfileProtocol.swift +4 -4
  70. data/fastlane/swift/Snapshotfile.swift +1 -1
  71. data/fastlane/swift/SnapshotfileProtocol.swift +1 -1
  72. data/fastlane/swift/formatting/Brewfile.lock.json +11 -11
  73. data/produce/lib/produce/commands_generator.rb +99 -27
  74. data/produce/lib/produce/developer_center.rb +42 -4
  75. data/produce/lib/produce/options.rb +1 -1
  76. data/produce/lib/produce/service.rb +270 -179
  77. data/screengrab/lib/screengrab/android_environment.rb +2 -52
  78. data/screengrab/lib/screengrab/dependency_checker.rb +0 -20
  79. data/screengrab/lib/screengrab/options.rb +5 -2
  80. data/screengrab/lib/screengrab/runner.rb +108 -106
  81. data/snapshot/lib/assets/SnapfileTemplate +2 -1
  82. data/snapshot/lib/assets/SnapfileTemplate.swift +2 -1
  83. data/snapshot/lib/assets/SnapshotHelper.swift +14 -10
  84. data/snapshot/lib/snapshot/reports_generator.rb +3 -1
  85. data/snapshot/lib/snapshot/test_command_generator.rb +16 -2
  86. data/spaceship/lib/spaceship/connect_api/models/bundle_id.rb +8 -0
  87. data/spaceship/lib/spaceship/connect_api/models/bundle_id_capability.rb +58 -17
  88. data/spaceship/lib/spaceship/connect_api/provisioning/provisioning.rb +41 -1
  89. metadata +20 -21
  90. data/fastlane/lib/fastlane/helper/.git_helper.rb.swp +0 -0
@@ -17,4 +17,4 @@ public class Gymfile: GymfileProtocol {
17
17
  // during the `init` process, and you won't see this message
18
18
  }
19
19
 
20
- // Generated with fastlane 2.186.0
20
+ // Generated with fastlane 2.187.0
@@ -196,4 +196,4 @@ public extension GymfileProtocol {
196
196
 
197
197
  // Please don't remove the lines below
198
198
  // They are used to detect outdated files
199
- // FastlaneRunnerAPIVersion [0.9.77]
199
+ // FastlaneRunnerAPIVersion [0.9.78]
@@ -17,4 +17,4 @@ public class Matchfile: MatchfileProtocol {
17
17
  // during the `init` process, and you won't see this message
18
18
  }
19
19
 
20
- // Generated with fastlane 2.186.0
20
+ // Generated with fastlane 2.187.0
@@ -184,4 +184,4 @@ public extension MatchfileProtocol {
184
184
 
185
185
  // Please don't remove the lines below
186
186
  // They are used to detect outdated files
187
- // FastlaneRunnerAPIVersion [0.9.71]
187
+ // FastlaneRunnerAPIVersion [0.9.72]
@@ -17,4 +17,4 @@ public class Precheckfile: PrecheckfileProtocol {
17
17
  // during the `init` process, and you won't see this message
18
18
  }
19
19
 
20
- // Generated with fastlane 2.186.0
20
+ // Generated with fastlane 2.187.0
@@ -52,4 +52,4 @@ public extension PrecheckfileProtocol {
52
52
 
53
53
  // Please don't remove the lines below
54
54
  // They are used to detect outdated files
55
- // FastlaneRunnerAPIVersion [0.9.70]
55
+ // FastlaneRunnerAPIVersion [0.9.71]
@@ -17,4 +17,4 @@ public class Scanfile: ScanfileProtocol {
17
17
  // during the `init` process, and you won't see this message
18
18
  }
19
19
 
20
- // Generated with fastlane 2.186.0
20
+ // Generated with fastlane 2.187.0
@@ -292,4 +292,4 @@ public extension ScanfileProtocol {
292
292
 
293
293
  // Please don't remove the lines below
294
294
  // They are used to detect outdated files
295
- // FastlaneRunnerAPIVersion [0.9.82]
295
+ // FastlaneRunnerAPIVersion [0.9.83]
@@ -17,4 +17,4 @@ public class Screengrabfile: ScreengrabfileProtocol {
17
17
  // during the `init` process, and you won't see this message
18
18
  }
19
19
 
20
- // Generated with fastlane 2.186.0
20
+ // Generated with fastlane 2.187.0
@@ -5,7 +5,7 @@ public protocol ScreengrabfileProtocol: class {
5
5
  /// Path to the root of your Android SDK installation, e.g. ~/tools/android-sdk-macosx
6
6
  var androidHome: String? { get }
7
7
 
8
- /// The Android build tools version to use, e.g. '23.0.2'
8
+ /// **DEPRECATED!** The Android build tools version to use, e.g. '23.0.2'
9
9
  var buildToolsVersion: String? { get }
10
10
 
11
11
  /// A list of locales which should be used
@@ -38,10 +38,10 @@ public protocol ScreengrabfileProtocol: class {
38
38
  /// The fully qualified class name of your test instrumentation runner
39
39
  var testInstrumentationRunner: String { get }
40
40
 
41
- /// Return the device to this locale after running tests
41
+ /// **DEPRECATED!** Return the device to this locale after running tests
42
42
  var endingLocale: String { get }
43
43
 
44
- /// Restarts the adb daemon using `adb root` to allow access to screenshots directories on device. Use if getting 'Permission denied' errors
44
+ /// **DEPRECATED!** Restarts the adb daemon using `adb root` to allow access to screenshots directories on device. Use if getting 'Permission denied' errors
45
45
  var useAdbRoot: Bool { get }
46
46
 
47
47
  /// The path to the APK for the app under test
@@ -96,4 +96,4 @@ public extension ScreengrabfileProtocol {
96
96
 
97
97
  // Please don't remove the lines below
98
98
  // They are used to detect outdated files
99
- // FastlaneRunnerAPIVersion [0.9.72]
99
+ // FastlaneRunnerAPIVersion [0.9.73]
@@ -17,4 +17,4 @@ public class Snapshotfile: SnapshotfileProtocol {
17
17
  // during the `init` process, and you won't see this message
18
18
  }
19
19
 
20
- // Generated with fastlane 2.186.0
20
+ // Generated with fastlane 2.187.0
@@ -200,4 +200,4 @@ public extension SnapshotfileProtocol {
200
200
 
201
201
  // Please don't remove the lines below
202
202
  // They are used to detect outdated files
203
- // FastlaneRunnerAPIVersion [0.9.66]
203
+ // FastlaneRunnerAPIVersion [0.9.67]
@@ -2,30 +2,30 @@
2
2
  "entries": {
3
3
  "brew": {
4
4
  "swiftformat": {
5
- "version": "0.48.5",
5
+ "version": "0.48.6",
6
6
  "bottle": {
7
7
  "rebuild": 0,
8
8
  "root_url": "https://ghcr.io/v2/homebrew/core",
9
9
  "files": {
10
10
  "arm64_big_sur": {
11
11
  "cellar": ":any_skip_relocation",
12
- "url": "https://ghcr.io/v2/homebrew/core/swiftformat/blobs/sha256:7619ac8360774b9854b838912b43b8d7be9dfd39a2cf4bdd24afbc2007cd6bd8",
13
- "sha256": "7619ac8360774b9854b838912b43b8d7be9dfd39a2cf4bdd24afbc2007cd6bd8"
12
+ "url": "https://ghcr.io/v2/homebrew/core/swiftformat/blobs/sha256:78c5f4a349071a849e9f9eb0368907e5b8414e16e321fa4b17e821ab93d08f4e",
13
+ "sha256": "78c5f4a349071a849e9f9eb0368907e5b8414e16e321fa4b17e821ab93d08f4e"
14
14
  },
15
15
  "big_sur": {
16
16
  "cellar": ":any_skip_relocation",
17
- "url": "https://ghcr.io/v2/homebrew/core/swiftformat/blobs/sha256:c50e89c6fd21e817cdf5f1b1d0a51c25553e0d5bcb396fe18e6404f4ad31c2b8",
18
- "sha256": "c50e89c6fd21e817cdf5f1b1d0a51c25553e0d5bcb396fe18e6404f4ad31c2b8"
17
+ "url": "https://ghcr.io/v2/homebrew/core/swiftformat/blobs/sha256:cdb2f3d905c2bbad7fff6cef0be18760ebf1a6595149eac5504df7c575154015",
18
+ "sha256": "cdb2f3d905c2bbad7fff6cef0be18760ebf1a6595149eac5504df7c575154015"
19
19
  },
20
20
  "catalina": {
21
21
  "cellar": ":any_skip_relocation",
22
- "url": "https://ghcr.io/v2/homebrew/core/swiftformat/blobs/sha256:41d5ecd73bba3c90c8770d33dc86fb0a07f9fb23034d1b07517e7dd9431e8280",
23
- "sha256": "41d5ecd73bba3c90c8770d33dc86fb0a07f9fb23034d1b07517e7dd9431e8280"
22
+ "url": "https://ghcr.io/v2/homebrew/core/swiftformat/blobs/sha256:ae2a296fb9e96b6024226e2e71538e93c8ac29e80f162a29fc1530b341084593",
23
+ "sha256": "ae2a296fb9e96b6024226e2e71538e93c8ac29e80f162a29fc1530b341084593"
24
24
  },
25
25
  "mojave": {
26
26
  "cellar": ":any_skip_relocation",
27
- "url": "https://ghcr.io/v2/homebrew/core/swiftformat/blobs/sha256:369cb9a0eca80fc8fd0ae5a1dcf6dad9aea366d3325e196276b05b9abb392357",
28
- "sha256": "369cb9a0eca80fc8fd0ae5a1dcf6dad9aea366d3325e196276b05b9abb392357"
27
+ "url": "https://ghcr.io/v2/homebrew/core/swiftformat/blobs/sha256:6ba32395078693bc518d290d523090932b266fba89f82a792a465b476226f0c5",
28
+ "sha256": "6ba32395078693bc518d290d523090932b266fba89f82a792a465b476226f0c5"
29
29
  }
30
30
  }
31
31
  }
@@ -35,9 +35,9 @@
35
35
  "system": {
36
36
  "macos": {
37
37
  "catalina": {
38
- "HOMEBREW_VERSION": "3.2.0-18-g4f33c2c",
38
+ "HOMEBREW_VERSION": "3.2.0-77-gd305f72",
39
39
  "HOMEBREW_PREFIX": "/usr/local",
40
- "Homebrew/homebrew-core": "b7aeea4e146fc17d70862def113e90ee3153d514",
40
+ "Homebrew/homebrew-core": "0b13b342053d414d1b241c2c7a446b74d79cc90e",
41
41
  "CLT": "11.0.0.33.12",
42
42
  "Xcode": "12.4",
43
43
  "macOS": "10.15.7"
@@ -47,29 +47,65 @@ module Produce
47
47
  c.description = 'Enable specific Application Services for a specific app on the Apple Developer Portal'
48
48
  c.example('Enable HealthKit, HomeKit and Passbook', 'fastlane produce enable_services -a com.example.app --healthkit --homekit --passbook')
49
49
 
50
- c.option('--access-wifi', 'Enable Access WiFi')
51
- c.option('--app-group', 'Enable App Groups')
50
+ c.option('--access-wifi', 'Enable Access Wifi')
51
+ c.option('--app-attest', 'Enable App Attest')
52
+ c.option('--app-group', 'Enable App Group')
52
53
  c.option('--apple-pay', 'Enable Apple Pay')
53
- c.option('--auto-fill-credential', 'Enable AutoFill Credential')
54
54
  c.option('--associated-domains', 'Enable Associated Domains')
55
+ c.option('--auto-fill-credential', 'Enable Auto Fill Credential')
56
+ c.option('--class-kit', 'Enable Class Kit')
57
+ c.option('--icloud STRING', String, 'Enable iCloud, suitable values are "xcode5_compatible" and "xcode6_compatible"')
58
+ c.option('--custom-network-protocol', 'Enable Custom Network Protocol')
55
59
  c.option('--data-protection STRING', String, 'Enable Data Protection, suitable values are "complete", "unlessopen" and "untilfirstauth"')
56
- c.option('--game-center', 'Enable Game Center')
57
- c.option('--healthkit', 'Enable HealthKit')
58
- c.option('--homekit', 'Enable HomeKit')
60
+ c.option('--family-controls', 'Enable Family Controls')
61
+ c.option('--file-provider-testing-mode', 'Enable File Provider Testing Mode')
62
+ c.option('--fonts', 'Enable Fonts')
63
+ c.option('--extended-virtual-address-space', 'Enable Extended Virtual Address Space')
64
+ c.option('--game-center STRING', String, 'Enable Game Center, suitable values are "ios" and "macos"')
65
+ c.option('--health-kit', 'Enable Health Kit')
66
+ c.option('--hls-interstitial-preview', 'Enable Hls Interstitial Preview')
67
+ c.option('--home-kit', 'Enable Home Kit')
59
68
  c.option('--hotspot', 'Enable Hotspot')
60
- c.option('--icloud STRING', String, 'Enable iCloud, suitable values are "legacy" and "cloudkit"')
61
- c.option('--in-app-purchase', 'Enable In-App Purchase')
62
- c.option('--inter-app-audio', 'Enable Inter-App-Audio')
69
+ c.option('--in-app-purchase', 'Enable In App Purchase')
70
+ c.option('--inter-app-audio', 'Enable Inter App Audio')
71
+ c.option('--low-latency-hls', 'Enable Low Latency Hls')
72
+ c.option('--managed-associated-domains', 'Enable Managed Associated Domains')
73
+ c.option('--maps', 'Enable Maps')
63
74
  c.option('--multipath', 'Enable Multipath')
64
- c.option('--network-extension', 'Enable Network Extensions')
75
+ c.option('--network-extension', 'Enable Network Extension')
65
76
  c.option('--nfc-tag-reading', 'Enable NFC Tag Reading')
66
77
  c.option('--personal-vpn', 'Enable Personal VPN')
67
78
  c.option('--passbook', 'Enable Passbook (deprecated)')
68
- c.option('--push-notification', 'Enable Push notification (only enables the service, does not configure certificates)')
69
- c.option('--sirikit', 'Enable SiriKit')
70
- c.option('--vpn-conf', 'Enable VPN Configuration (deprecated)')
79
+ c.option('--push-notification', 'Enable Push Notification')
80
+ c.option('--sign-in-with-apple', 'Enable Sign In With Apple')
81
+ c.option('--siri-kit', 'Enable Siri Kit')
82
+ c.option('--system-extension', 'Enable System Extension')
83
+ c.option('--user-management', 'Enable User Management')
84
+ c.option('--vpn-configuration', 'Enable Vpn Configuration (deprecated)')
71
85
  c.option('--wallet', 'Enable Wallet')
72
- c.option('--wireless-conf', 'Enable Wireless Accessory Configuration')
86
+ c.option('--wireless-accessory', 'Enable Wireless Accessory')
87
+ c.option('--car-play-audio-app', 'Enable Car Play Audio App')
88
+ c.option('--car-play-messaging-app', 'Enable Car Play Messaging App')
89
+ c.option('--car-play-navigation-app', 'Enable Car Play Navigation App')
90
+ c.option('--car-play-voip-calling-app', 'Enable Car Play Voip Calling App')
91
+ c.option('--critical-alerts', 'Enable Critical Alerts')
92
+ c.option('--hotspot-helper', 'Enable Hotspot Helper')
93
+ c.option('--driver-kit', 'Enable DriverKit')
94
+ c.option('--driver-kit-endpoint-security', 'Enable DriverKit Endpoint Security')
95
+ c.option('--driver-kit-family-hid-device', 'Enable DriverKit Family HID Device')
96
+ c.option('--driver-kit-family-networking', 'Enable DriverKit Family Networking')
97
+ c.option('--driver-kit-family-serial', 'Enable DriverKit Family Serial')
98
+ c.option('--driver-kit-hid-event-service', 'Enable DriverKit HID EventService')
99
+ c.option('--driver-kit-transport-hid', 'Enable DriverKit Transport HID')
100
+ c.option('--multitasking-camera-access', 'Enable Multitasking Camera Access')
101
+ c.option('--sf-universal-link-api', 'Enable SFUniversalLink API')
102
+ c.option('--vp9-decoder', 'Enable VP9 Decoder')
103
+ c.option('--music-kit', 'Enable MusicKit')
104
+ c.option('--shazam-kit', 'Enable ShazamKit')
105
+ c.option('--communication-notifications', 'Enable Communication Notifications')
106
+ c.option('--group-activities', 'Enable Group Activities')
107
+ c.option('--health-kit-estimate-recalibration', 'Enable HealthKit Estimate Recalibration')
108
+ c.option('--time-sensitive-notifications', 'Enable Time Sensitive Notifications')
73
109
 
74
110
  FastlaneCore::CommanderGenerator.new.generate(Produce::Options.available_options, command: c)
75
111
 
@@ -88,29 +124,65 @@ module Produce
88
124
  c.description = 'Disable specific Application Services for a specific app on the Apple Developer Portal'
89
125
  c.example('Disable HealthKit', 'fastlane produce disable_services -a com.example.app --healthkit')
90
126
 
91
- c.option('--access-wifi', 'Disable Access WiFi')
92
- c.option('--app-group', 'Disable App Groups')
127
+ c.option('--access-wifi', 'Disable Access Wifi')
128
+ c.option('--app-attest', 'Disable App Attest')
129
+ c.option('--app-group', 'Disable App Group')
93
130
  c.option('--apple-pay', 'Disable Apple Pay')
94
- c.option('--auto-fill-credential', 'Disable AutoFill Credential')
95
131
  c.option('--associated-domains', 'Disable Associated Domains')
132
+ c.option('--auto-fill-credential', 'Disable Auto Fill Credential')
133
+ c.option('--class-kit', 'Disable Class Kit')
134
+ c.option('--icloud', 'Disable iCloud')
135
+ c.option('--custom-network-protocol', 'Disable Custom Network Protocol')
96
136
  c.option('--data-protection', 'Disable Data Protection')
137
+ c.option('--extended-virtual-address-space', 'Disable Extended Virtual Address Space')
138
+ c.option('--family-controls', 'Disable Family Controls')
139
+ c.option('--file-provider-testing-mode', 'Disable File Provider Testing Mode')
140
+ c.option('--fonts', 'Disable Fonts')
97
141
  c.option('--game-center', 'Disable Game Center')
98
- c.option('--healthkit', 'Disable HealthKit')
99
- c.option('--homekit', 'Disable HomeKit')
142
+ c.option('--health-kit', 'Disable Health Kit')
143
+ c.option('--hls-interstitial-preview', 'Disable Hls Interstitial Preview')
144
+ c.option('--home-kit', 'Disable Home Kit')
100
145
  c.option('--hotspot', 'Disable Hotspot')
101
- c.option('--icloud', 'Disable iCloud')
102
- c.option('--in-app-purchase', 'Disable In-App Purchase')
103
- c.option('--inter-app-audio', 'Disable Inter-App-Audio')
146
+ c.option('--in-app-purchase', 'Disable In App Purchase')
147
+ c.option('--inter-app-audio', 'Disable Inter App Audio')
148
+ c.option('--low-latency-hls', 'Disable Low Latency Hls')
149
+ c.option('--managed-associated-domains', 'Disable Managed Associated Domains')
150
+ c.option('--maps', 'Disable Maps')
104
151
  c.option('--multipath', 'Disable Multipath')
105
- c.option('--network-extension', 'Disable Network Extensions')
152
+ c.option('--network-extension', 'Disable Network Extension')
106
153
  c.option('--nfc-tag-reading', 'Disable NFC Tag Reading')
107
154
  c.option('--personal-vpn', 'Disable Personal VPN')
108
155
  c.option('--passbook', 'Disable Passbook (deprecated)')
109
- c.option('--push-notification', 'Disable Push notifications')
110
- c.option('--sirikit', 'Disable SiriKit')
111
- c.option('--vpn-conf', 'Disable VPN Configuration (deprecated)')
156
+ c.option('--push-notification', 'Disable Push Notification')
157
+ c.option('--sign-in-with-apple', 'Disable Sign In With Apple')
158
+ c.option('--siri-kit', 'Disable Siri Kit')
159
+ c.option('--system-extension', 'Disable System Extension')
160
+ c.option('--user-management', 'Disable User Management')
161
+ c.option('--vpn-configuration', 'Disable Vpn Configuration (deprecated)')
112
162
  c.option('--wallet', 'Disable Wallet')
113
- c.option('--wireless-conf', 'Disable Wireless Accessory Configuration')
163
+ c.option('--wireless-accessory', 'Disable Wireless Accessory')
164
+ c.option('--car-play-audio-app', 'Disable Car Play Audio App')
165
+ c.option('--car-play-messaging-app', 'Disable Car Play Messaging App')
166
+ c.option('--car-play-navigation-app', 'Disable Car Play Navigation App')
167
+ c.option('--car-play-voip-calling-app', 'Disable Car Play Voip Calling App')
168
+ c.option('--critical-alerts', 'Disable Critical Alerts')
169
+ c.option('--hotspot-helper', 'Disable Hotspot Helper')
170
+ c.option('--driver-kit', 'Disable DriverKit')
171
+ c.option('--driver-kit-endpoint-security', 'Disable DriverKit Endpoint Security')
172
+ c.option('--driver-kit-family-hid-device', 'Disable DriverKit Family HID Device')
173
+ c.option('--driver-kit-family-networking', 'Disable DriverKit Family Networking')
174
+ c.option('--driver-kit-family-serial', 'Disable DriverKit Family Serial')
175
+ c.option('--driver-kit-hid-event-service', 'Disable DriverKit HID EventService')
176
+ c.option('--driver-kit-transport-hid', 'Disable DriverKit Transport HID')
177
+ c.option('--multitasking-camera-access', 'Disable Multitasking Camera Access')
178
+ c.option('--sf-universal-link-api', 'Disable SFUniversalLink API')
179
+ c.option('--vp9-decoder', 'Disable VP9 Decoder')
180
+ c.option('--music-kit', 'Disable MusicKit')
181
+ c.option('--shazam-kit', 'Disable ShazamKit')
182
+ c.option('--communication-notifications', 'Disable Communication Notifications')
183
+ c.option('--group-activities', 'Disable Group Activities')
184
+ c.option('--health-kit-estimate-recalibration', 'Disable HealthKit Estimate Recalibration')
185
+ c.option('--time-sensitive-notifications', 'Disable Time Sensitive Notifications')
114
186
 
115
187
  FastlaneCore::CommanderGenerator.new.generate(Produce::Options.available_options, command: c)
116
188
 
@@ -10,37 +10,75 @@ module Produce
10
10
  SERVICE_UNTIL_FIRST_LAUNCH = "untilfirstauth"
11
11
  SERVICE_LEGACY = "legacy"
12
12
  SERVICE_CLOUDKIT = "cloudkit"
13
+ SERVICE_GAME_CENTER_IOS = "ios"
14
+ SERVICE_GAME_CENTER_MAC = "mac"
15
+ SERVICE_PRIMARY_APP_CONSENT = "on"
13
16
 
14
17
  ALLOWED_SERVICES = {
15
18
  access_wifi: [SERVICE_ON, SERVICE_OFF],
19
+ app_attest: [SERVICE_ON, SERVICE_OFF],
16
20
  app_group: [SERVICE_ON, SERVICE_OFF],
17
21
  apple_pay: [SERVICE_ON, SERVICE_OFF],
18
22
  associated_domains: [SERVICE_ON, SERVICE_OFF],
19
23
  auto_fill_credential: [SERVICE_ON, SERVICE_OFF],
24
+ class_kit: [SERVICE_ON, SERVICE_OFF],
25
+ icloud: [SERVICE_LEGACY, SERVICE_CLOUDKIT],
26
+ custom_network_protocol: [SERVICE_ON, SERVICE_OFF],
20
27
  data_protection: [
21
28
  SERVICE_COMPLETE,
22
29
  SERVICE_UNLESS_OPEN,
23
30
  SERVICE_UNTIL_FIRST_LAUNCH
24
31
  ],
25
- game_center: [SERVICE_ON, SERVICE_OFF],
32
+ extended_virtual_address_space: [SERVICE_ON, SERVICE_OFF],
33
+ family_controls: [SERVICE_ON, SERVICE_OFF],
34
+ file_provider_testing_mode: [SERVICE_ON, SERVICE_OFF],
35
+ fonts: [SERVICE_ON, SERVICE_OFF],
36
+ game_center: [SERVICE_GAME_CENTER_IOS, SERVICE_GAME_CENTER_MAC],
26
37
  health_kit: [SERVICE_ON, SERVICE_OFF],
38
+ hls_interstitial_preview: [SERVICE_ON, SERVICE_OFF],
27
39
  home_kit: [SERVICE_ON, SERVICE_OFF],
28
40
  hotspot: [SERVICE_ON, SERVICE_OFF],
29
- icloud: [SERVICE_LEGACY, SERVICE_CLOUDKIT],
30
41
  in_app_purchase: [SERVICE_ON, SERVICE_OFF],
31
42
  inter_app_audio: [SERVICE_ON, SERVICE_OFF],
43
+ low_latency_hls: [SERVICE_ON, SERVICE_OFF],
44
+ managed_associated_domains: [SERVICE_ON, SERVICE_OFF],
45
+ maps: [SERVICE_ON, SERVICE_OFF],
32
46
  multipath: [SERVICE_ON, SERVICE_OFF],
33
47
  network_extension: [SERVICE_ON, SERVICE_OFF],
34
48
  nfc_tag_reading: [SERVICE_ON, SERVICE_OFF],
35
49
  personal_vpn: [SERVICE_ON, SERVICE_OFF],
36
50
  passbook: [SERVICE_ON, SERVICE_OFF],
37
51
  push_notification: [SERVICE_ON, SERVICE_OFF],
52
+ sign_in_with_apple: [SERVICE_PRIMARY_APP_CONSENT],
38
53
  siri_kit: [SERVICE_ON, SERVICE_OFF],
54
+ system_extension: [SERVICE_ON, SERVICE_OFF],
55
+ user_management: [SERVICE_ON, SERVICE_OFF],
39
56
  vpn_configuration: [SERVICE_ON, SERVICE_OFF],
40
57
  wallet: [SERVICE_ON, SERVICE_OFF],
41
- wireless_accessory: [SERVICE_ON, SERVICE_OFF]
58
+ wireless_accessory: [SERVICE_ON, SERVICE_OFF],
59
+ car_play_audio_app: [SERVICE_ON, SERVICE_OFF],
60
+ car_play_messaging_app: [SERVICE_ON, SERVICE_OFF],
61
+ car_play_navigation_app: [SERVICE_ON, SERVICE_OFF],
62
+ car_play_voip_calling_app: [SERVICE_ON, SERVICE_OFF],
63
+ critical_alerts: [SERVICE_ON, SERVICE_OFF],
64
+ hotspot_helper: [SERVICE_ON, SERVICE_OFF],
65
+ driver_kit: [SERVICE_ON, SERVICE_OFF],
66
+ driver_kit_endpoint_security: [SERVICE_ON, SERVICE_OFF],
67
+ driver_kit_family_hid_device: [SERVICE_ON, SERVICE_OFF],
68
+ driver_kit_family_networking: [SERVICE_ON, SERVICE_OFF],
69
+ driver_kit_family_serial: [SERVICE_ON, SERVICE_OFF],
70
+ driver_kit_hid_event_service: [SERVICE_ON, SERVICE_OFF],
71
+ driver_kit_transport_hid: [SERVICE_ON, SERVICE_OFF],
72
+ multitasking_camera_access: [SERVICE_ON, SERVICE_OFF],
73
+ sf_universal_link_api: [SERVICE_ON, SERVICE_OFF],
74
+ vp9_decoder: [SERVICE_ON, SERVICE_OFF],
75
+ music_kit: [SERVICE_ON, SERVICE_OFF],
76
+ shazam_kit: [SERVICE_ON, SERVICE_OFF],
77
+ communication_notifications: [SERVICE_ON, SERVICE_OFF],
78
+ group_activities: [SERVICE_ON, SERVICE_OFF],
79
+ health_kit_estimate_recalibration: [SERVICE_ON, SERVICE_OFF],
80
+ time_sensitive_notifications: [SERVICE_ON, SERVICE_OFF],
42
81
  }
43
-
44
82
  def run
45
83
  login
46
84
  create_new_app
@@ -77,7 +77,7 @@ module Produce
77
77
  FastlaneCore::ConfigItem.new(key: :company_name,
78
78
  short_option: "-c",
79
79
  env_name: "PRODUCE_COMPANY_NAME",
80
- description: "The name of your company. Only required if it's the first app you create",
80
+ description: "The name of your company. It's used to set company name on App Store Connect team's app pages. Only required if it's the first app you create",
81
81
  optional: true),
82
82
  FastlaneCore::ConfigItem.new(key: :skip_itc,
83
83
  short_option: "-i",
@@ -1,8 +1,13 @@
1
1
  require 'spaceship'
2
2
  require_relative 'module'
3
3
 
4
+ # rubocop:disable Metrics/ClassLength
4
5
  module Produce
5
6
  class Service
7
+ include Spaceship::ConnectAPI::BundleIdCapability::Type
8
+ include Spaceship::ConnectAPI::BundleIdCapability::Settings
9
+ include Spaceship::ConnectAPI::BundleIdCapability::Options
10
+
6
11
  def self.enable(options, args)
7
12
  self.new.enable(options, args)
8
13
  end
@@ -12,308 +17,394 @@ module Produce
12
17
  end
13
18
 
14
19
  def enable(options, _args)
15
- unless app
20
+ unless bundle_id
16
21
  UI.message("[DevCenter] App '#{Produce.config[:app_identifier]}' does not exist")
17
22
  return
18
23
  end
19
24
 
20
- UI.success("[DevCenter] App found '#{app.name}'")
25
+ UI.success("[DevCenter] App found '#{bundle_id.name}'")
21
26
  UI.message("Enabling services")
22
- enabled = update(true, app, options)
27
+ enabled = update(true, options)
23
28
  UI.success("Done! Enabled #{enabled} services.")
24
29
  end
25
30
 
26
31
  def disable(options, _args)
27
- unless app
32
+ unless bundle_id
28
33
  UI.message("[DevCenter] App '#{Produce.config[:app_identifier]}' does not exist")
29
34
  return
30
35
  end
31
36
 
32
- UI.success("[DevCenter] App found '#{app.name}'")
37
+ UI.success("[DevCenter] App found '#{bundle_id.name}'")
33
38
  UI.message("Disabling services")
34
- disabled = update(false, app, options)
39
+ disabled = update(false, options)
35
40
  UI.success("Done! Disabled #{disabled} services.")
36
41
  end
37
42
 
38
43
  def valid_services_for(options)
39
- allowed_keys = [:access_wifi, :app_group, :apple_pay, :associated_domains, :auto_fill_credential, :data_protection, :game_center, :healthkit, :homekit,
40
- :hotspot, :icloud, :in_app_purchase, :inter_app_audio, :multipath, :network_extension,
41
- :nfc_tag_reading, :personal_vpn, :passbook, :push_notification, :sirikit, :vpn_conf,
42
- :wallet, :wireless_conf]
44
+ allowed_keys = [:access_wifi, :app_attest, :app_group, :apple_pay, :associated_domains, :auto_fill_credential, :car_play_audio_app, :car_play_messaging_app,
45
+ :car_play_navigation_app, :car_play_voip_calling_app, :class_kit, :icloud, :critical_alerts, :custom_network_protocol, :data_protection,
46
+ :extended_virtual_address_space, :file_provider_testing_mode, :family_controls, :fonts, :game_center, :health_kit, :hls_interstitial_preview, :home_kit, :hotspot,
47
+ :hotspot_helper, :in_app_purchase, :inter_app_audio, :low_latency_hls, :managed_associated_domains, :maps, :multipath, :network_extension,
48
+ :nfc_tag_reading, :passbook, :personal_vpn, :push_notification, :sign_in_with_apple, :siri_kit, :system_extension, :user_management, :vpn_configuration, :wallet,
49
+ :wireless_accessory, :driver_kit, :driver_kit_endpoint_security, :driver_kit_family_hid_device, :driver_kit_family_networking, :driver_kit_family_serial,
50
+ :driver_kit_hid_event_service, :driver_kit_transport_hid, :multitasking_camera_access, :sf_universal_link_api, :vp9_decoder, :music_kit, :shazam_kit,
51
+ :communication_notifications, :group_activities, :health_kit_estimate_recalibration, :time_sensitive_notifications]
43
52
  options.__hash__.select { |key, value| allowed_keys.include?(key) }
44
53
  end
45
54
 
55
+ # @return (Hash) Settings configuration for a key-settings combination
56
+ # @example
57
+ # [{
58
+ # key: "DATA_PROTECTION_PERMISSION_LEVEL",
59
+ # options:
60
+ # [
61
+ # {
62
+ # key: "COMPLETE_PROTECTION"
63
+ # }
64
+ # ]
65
+ # }]
66
+ def build_settings_for(settings_key:, options_key:)
67
+ return [{
68
+ key: settings_key,
69
+ options: [ {
70
+ key: options_key
71
+ } ]
72
+ }]
73
+ end
74
+
46
75
  # rubocop:disable Metrics/PerceivedComplexity
47
- def update(on, app, options)
76
+ # rubocop:disable Require/MissingRequireStatement
77
+ def update(on, options)
48
78
  updated = valid_services_for(options).count
49
79
 
50
80
  if options.access_wifi
51
81
  UI.message("\tAccess WiFi")
52
- if on
53
- app.update_service(Spaceship.app_service.access_wifi.on)
54
- else
55
- app.update_service(Spaceship.app_service.access_wifi.off)
56
- end
82
+ bundle_id.update_capability(ACCESS_WIFI_INFORMATION, enabled: on)
83
+ end
84
+
85
+ if options.access_wifi
86
+ UI.message("\tApp Attest")
87
+ bundle_id.update_capability(APP_ATTEST, enabled: on)
57
88
  end
58
89
 
59
90
  if options.app_group
60
91
  UI.message("\tApp Groups")
61
-
62
- if on
63
- app.update_service(Spaceship.app_service.app_group.on)
64
- else
65
- app.update_service(Spaceship.app_service.app_group.off)
66
- end
92
+ bundle_id.update_capability(APP_GROUPS, enabled: on)
67
93
  end
68
94
 
69
95
  if options.apple_pay
70
96
  UI.message("\tApple Pay")
71
-
72
- if on
73
- app.update_service(Spaceship.app_service.apple_pay.on)
74
- else
75
- app.update_service(Spaceship.app_service.apple_pay.off)
76
- end
97
+ bundle_id.update_capability(APPLE_PAY, enabled: on)
77
98
  end
78
99
 
79
100
  if options.associated_domains
80
101
  UI.message("\tAssociated Domains")
81
-
82
- if on
83
- app.update_service(Spaceship.app_service.associated_domains.on)
84
- else
85
- app.update_service(Spaceship.app_service.associated_domains.off)
86
- end
102
+ bundle_id.update_capability(ASSOCIATED_DOMAINS, enabled: on)
87
103
  end
88
104
 
89
105
  if options.auto_fill_credential
90
106
  UI.message("\tAutoFill Credential")
107
+ bundle_id.update_capability(AUTOFILL_CREDENTIAL_PROVIDER, enabled: on)
108
+ end
91
109
 
92
- if on
93
- app.update_service(Spaceship.app_service.auto_fill_credential.on)
94
- else
95
- app.update_service(Spaceship.app_service.auto_fill_credential.off)
96
- end
110
+ if options.car_play_audio_app
111
+ UI.message("\tCarPlay Audio App")
112
+ bundle_id.update_capability(CARPLAY_PLAYABLE_CONTENT, enabled: on)
113
+ end
114
+
115
+ if options.car_play_messaging_app
116
+ UI.message("\tCarPlay Messaging App")
117
+ bundle_id.update_capability(CARPLAY_MESSAGING, enabled: on)
118
+ end
119
+
120
+ if options.car_play_navigation_app
121
+ UI.message("\tCarPlay Navigation App")
122
+ bundle_id.update_capability(CARPLAY_NAVIGATION, enabled: on)
123
+ end
124
+
125
+ if options.car_play_voip_calling_app
126
+ UI.message("\tCarPlay Voip Calling App")
127
+ bundle_id.update_capability(CARPLAY_VOIP, enabled: on)
128
+ end
129
+
130
+ if options.class_kit
131
+ UI.message("\tClassKit")
132
+ bundle_id.update_capability(CLASSKIT, enabled: on)
133
+ end
134
+
135
+ if options.critical_alerts
136
+ UI.message("\tCritical Alerts")
137
+ bundle_id.update_capability(CRITICAL_ALERTS, enabled: on)
138
+ end
139
+
140
+ if options.custom_network_protocol
141
+ UI.message("\tCustom Network Protocol")
142
+ bundle_id.update_capability(NETWORK_CUSTOM_PROTOCOL, enabled: on)
97
143
  end
98
144
 
99
145
  if options.data_protection
100
146
  UI.message("\tData Protection")
101
147
 
102
- if on
103
- case options.data_protection
104
- when "complete"
105
- app.update_service(Spaceship.app_service.data_protection.complete)
106
- when "unlessopen"
107
- app.update_service(Spaceship.app_service.data_protection.unless_open)
108
- when "untilfirstauth"
109
- app.update_service(Spaceship.app_service.data_protection.until_first_auth)
110
- else
111
- UI.user_error!("Unknown service '#{options.data_protection}'. Valid values: 'complete', 'unlessopen', 'untilfirstauth'")
112
- end
148
+ settings = []
149
+ case options.data_protection
150
+ when "complete"
151
+ settings = build_settings_for(settings_key: DATA_PROTECTION_PERMISSION_LEVEL, options_key: COMPLETE_PROTECTION)
152
+ when "unlessopen"
153
+ settings = build_settings_for(settings_key: DATA_PROTECTION_PERMISSION_LEVEL, options_key: PROTECTED_UNLESS_OPEN)
154
+ when "untilfirstauth"
155
+ settings = build_settings_for(settings_key: DATA_PROTECTION_PERMISSION_LEVEL, options_key: PROTECTED_UNTIL_FIRST_USER_AUTH)
113
156
  else
114
- app.update_service(Spaceship.app_service.data_protection.off)
157
+ UI.user_error!("Unknown service '#{options.data_protection}'. Valid values: 'complete', 'unlessopen', 'untilfirstauth'") unless options.data_protection == true || options.data_protection == false
115
158
  end
159
+ bundle_id.update_capability(DATA_PROTECTION, enabled: on, settings: settings)
160
+ end
161
+
162
+ if options.extended_virtual_address_space
163
+ UI.message("\tExtended Virtual Address Space")
164
+ bundle_id.update_capability(EXTENDED_VIRTUAL_ADDRESSING, enabled: on)
165
+ end
166
+
167
+ if options.family_controls
168
+ UI.message("\tFamily Controls")
169
+ bundle_id.update_capability(FAMILY_CONTROLS, enabled: on)
170
+ end
171
+
172
+ if options.file_provider_testing_mode
173
+ UI.message("\tFile Provider Testing Mode")
174
+ bundle_id.update_capability(FILEPROVIDER_TESTINGMODE, enabled: on)
175
+ end
176
+
177
+ if options.fonts
178
+ UI.message("\tFonts")
179
+ bundle_id.update_capability(FONT_INSTALLATION, enabled: on)
116
180
  end
117
181
 
118
182
  if options.game_center
119
183
  UI.message("\tGame Center")
120
184
 
121
- if on
122
- app.update_service(Spaceship.app_service.game_center.on)
185
+ settings = []
186
+ case options.game_center
187
+ when "mac"
188
+ settings = build_settings_for(settings_key: GAME_CENTER_SETTING, options_key: GAME_CENTER_MAC)
189
+ when "ios"
190
+ settings = build_settings_for(settings_key: GAME_CENTER_SETTING, options_key: GAME_CENTER_IOS)
123
191
  else
124
- app.update_service(Spaceship.app_service.game_center.off)
192
+ UI.user_error!("Unknown service '#{options.game_center}'. Valid values: 'ios', 'mac'") unless options.game_center == true || options.game_center == false
125
193
  end
194
+ bundle_id.update_capability(GAME_CENTER, enabled: on, settings: settings)
126
195
  end
127
196
 
128
- if options.healthkit
197
+ if options.health_kit
129
198
  UI.message("\tHealthKit")
199
+ bundle_id.update_capability(HEALTHKIT, enabled: on)
200
+ end
130
201
 
131
- if on
132
- app.update_service(Spaceship.app_service.health_kit.on)
133
- else
134
- app.update_service(Spaceship.app_service.health_kit.off)
135
- end
202
+ if options.hls_interstitial_preview
203
+ UI.message("\tHLS Interstitial Preview")
204
+ bundle_id.update_capability(HLS_INTERSTITIAL_PREVIEW, enabled: on)
136
205
  end
137
206
 
138
- if options.homekit
207
+ if options.home_kit
139
208
  UI.message("\tHomeKit")
140
-
141
- if on
142
- app.update_service(Spaceship.app_service.home_kit.on)
143
- else
144
- app.update_service(Spaceship.app_service.home_kit.off)
145
- end
209
+ bundle_id.update_capability(HOMEKIT, enabled: on)
146
210
  end
147
211
 
148
- if options.wallet
149
- UI.message("\tWallet")
150
-
151
- if on
152
- app.update_service(Spaceship.app_service.wallet.on)
153
- else
154
- app.update_service(Spaceship.app_service.wallet.off)
155
- end
212
+ if options.hotspot
213
+ UI.message("\tHotspot")
214
+ bundle_id.update_capability(HOT_SPOT, enabled: on)
156
215
  end
157
216
 
158
- if options.wireless_conf
159
- UI.message("\tWireless Accessory Configuration")
160
-
161
- if on
162
- app.update_service(Spaceship.app_service.wireless_accessory.on)
163
- else
164
- app.update_service(Spaceship.app_service.wireless_accessory.off)
165
- end
217
+ if options.hotspot_helper
218
+ UI.message("\tHotspot Helper")
219
+ bundle_id.update_capability(HOTSPOT_HELPER_MANAGED, enabled: on)
166
220
  end
167
221
 
168
222
  if options.icloud
169
223
  UI.message("\tiCloud")
170
224
 
171
- if on
172
- case options.icloud
173
- when "legacy"
174
- app.update_service(Spaceship.app_service.cloud.on)
175
- app.update_service(Spaceship.app_service.cloud_kit.xcode5_compatible)
176
- when "cloudkit"
177
- app.update_service(Spaceship.app_service.cloud.on)
178
- app.update_service(Spaceship.app_service.cloud_kit.cloud_kit)
179
- else
180
- UI.user_error!("Unknown service '#{options.icloud}'. Valid values: 'legacy', 'cloudkit'")
181
- end
225
+ settings = []
226
+ case options.icloud
227
+ when "xcode6_compatible"
228
+ settings = build_settings_for(settings_key: ICLOUD_VERSION, options_key: XCODE_6)
229
+ when "xcode5_compatible"
230
+ settings = build_settings_for(settings_key: ICLOUD_VERSION, options_key: XCODE_5)
182
231
  else
183
- app.update_service(Spaceship.app_service.cloud.off)
232
+ UI.user_error!("Unknown service '#{options.icloud}'. Valid values: 'xcode6_compatible', 'xcode5_compatible', 'off'") unless options.icloud == true || options.icloud == false
184
233
  end
234
+ bundle_id.update_capability(ICLOUD, enabled: on, settings: settings)
185
235
  end
186
236
 
187
237
  if options.in_app_purchase
188
238
  UI.message("\tIn-App Purchase")
189
-
190
- if on
191
- app.update_service(Spaceship.app_service.in_app_purchase.on)
192
- else
193
- app.update_service(Spaceship.app_service.in_app_purchase.off)
194
- end
239
+ bundle_id.update_capability(IN_APP_PURCHASE, enabled: on)
195
240
  end
196
241
 
197
242
  if options.inter_app_audio
198
243
  UI.message("\tInter-App Audio")
244
+ bundle_id.update_capability(INTER_APP_AUDIO, enabled: on)
245
+ end
199
246
 
200
- if on
201
- app.update_service(Spaceship.app_service.inter_app_audio.on)
202
- else
203
- app.update_service(Spaceship.app_service.inter_app_audio.off)
204
- end
247
+ if options.low_latency_hls
248
+ UI.message("\tLow Latency HLS")
249
+ bundle_id.update_capability(COREMEDIA_HLS_LOW_LATENCY, enabled: on)
205
250
  end
206
251
 
207
- if options.personal_vpn
208
- UI.message("\tPersonal VPN")
252
+ if options.managed_associated_domains
253
+ UI.message("\tManaged Associated Domains")
254
+ bundle_id.update_capability(MDM_MANAGED_ASSOCIATED_DOMAINS, enabled: on)
255
+ end
209
256
 
210
- if on
211
- app.update_service(Spaceship.app_service.personal_vpn.on)
212
- else
213
- app.update_service(Spaceship.app_service.personal_vpn.off)
214
- end
257
+ if options.maps
258
+ UI.message("\tMaps")
259
+ bundle_id.update_capability(MAPS, enabled: on)
215
260
  end
216
261
 
217
- # deprecated
218
- if options.passbook
219
- UI.message("\tPassbook")
262
+ if options.multipath
263
+ UI.message("\tMultipath")
264
+ bundle_id.update_capability(MULTIPATH, enabled: on)
265
+ end
220
266
 
221
- if on
222
- app.update_service(Spaceship.app_service.passbook.on)
223
- else
224
- app.update_service(Spaceship.app_service.passbook.off)
225
- end
267
+ if options.network_extension
268
+ UI.message("\tNetwork Extension")
269
+ bundle_id.update_capability(NETWORK_EXTENSIONS, enabled: on)
270
+ end
271
+
272
+ if options.nfc_tag_reading
273
+ UI.message("\tNFC Tag Reading")
274
+ bundle_id.update_capability(NFC_TAG_READING, enabled: on)
275
+ end
276
+
277
+ if options.personal_vpn
278
+ UI.message("\tPersonal VPN")
279
+ bundle_id.update_capability(PERSONAL_VPN, enabled: on)
226
280
  end
227
281
 
228
282
  if options.push_notification
229
283
  UI.message("\tPush Notifications")
284
+ bundle_id.update_capability(PUSH_NOTIFICATIONS, enabled: on)
285
+ end
230
286
 
231
- if on
232
- # Don't enable push notifications if already enabled
233
- # Enabling push notifications when already on revokes certs
234
- # https://github.com/fastlane/fastlane/issues/15315
235
- # https://github.com/fastlane/fastlane/issues/8883
236
- unless app.details.enable_services.include?("push")
237
- app.update_service(Spaceship.app_service.push_notification.on)
238
- end
239
- else
240
- app.update_service(Spaceship.app_service.push_notification.off)
241
- end
287
+ if options.sign_in_with_apple
288
+ UI.message("\tSign In With Apple")
289
+ settings = build_settings_for(settings_key: APPLE_ID_AUTH_APP_CONSENT, options_key: PRIMARY_APP_CONSENT)
290
+ bundle_id.update_capability(APPLE_ID_AUTH, enabled: on, settings: settings)
242
291
  end
243
292
 
244
- if options.sirikit
293
+ if options.siri_kit
245
294
  UI.message("\tSiriKit")
295
+ bundle_id.update_capability(SIRIKIT, enabled: on)
296
+ end
246
297
 
247
- if on
248
- app.update_service(Spaceship.app_service.siri_kit.on)
249
- else
250
- app.update_service(Spaceship.app_service.siri_kit.off)
251
- end
298
+ if options.system_extension
299
+ UI.message("\tSystem Extension")
300
+ bundle_id.update_capability(SYSTEM_EXTENSION_INSTALL, enabled: on)
252
301
  end
253
302
 
254
- # deprecated
255
- if options.vpn_conf
256
- UI.message("\tVPN Configuration")
303
+ if options.user_management
304
+ UI.message("\tUser Management")
305
+ bundle_id.update_capability(USER_MANAGEMENT, enabled: on)
306
+ end
257
307
 
258
- if on
259
- app.update_service(Spaceship.app_service.vpn_configuration.on)
260
- else
261
- app.update_service(Spaceship.app_service.vpn_configuration.off)
262
- end
308
+ if options.wallet
309
+ UI.message("\tWallet")
310
+ bundle_id.update_capability(WALLET, enabled: on)
263
311
  end
264
312
 
265
- if options.network_extension
266
- UI.message("\tNetwork Extension")
313
+ if options.wireless_accessory
314
+ UI.message("\tWireless Accessory Configuration")
315
+ bundle_id.update_capability(WIRELESS_ACCESSORY_CONFIGURATION, enabled: on)
316
+ end
267
317
 
268
- if on
269
- app.update_service(Spaceship.app_service.network_extension.on)
270
- else
271
- app.update_service(Spaceship.app_service.network_extension.off)
272
- end
318
+ if options.driver_kit
319
+ UI.message("\tDriverKit")
320
+ bundle_id.update_capability(DRIVERKIT, enabled: on)
273
321
  end
274
322
 
275
- if options.hotspot
276
- UI.message("\tHotspot")
323
+ if options.driver_kit_endpoint_security
324
+ UI.message("\tDriverKit Endpoint Security")
325
+ bundle_id.update_capability(DRIVERKIT_ENDPOINT_SECURITY, enabled: on)
326
+ end
277
327
 
278
- if on
279
- app.update_service(Spaceship.app_service.hotspot.on)
280
- else
281
- app.update_service(Spaceship.app_service.hotspot.off)
282
- end
328
+ if options.driver_kit_family_hid_device
329
+ UI.message("\tDriverKit Family HID Device")
330
+ bundle_id.update_capability(DRIVERKIT_HID_DEVICE, enabled: on)
283
331
  end
284
332
 
285
- if options.multipath
286
- UI.message("\tMultipath")
333
+ if options.driver_kit_family_networking
334
+ UI.message("\tDriverKit Family Networking")
335
+ bundle_id.update_capability(DRIVERKIT_NETWORKING, enabled: on)
336
+ end
287
337
 
288
- if on
289
- app.update_service(Spaceship.app_service.multipath.on)
290
- else
291
- app.update_service(Spaceship.app_service.multipath.off)
292
- end
338
+ if options.driver_kit_family_serial
339
+ UI.message("\tDriverKit Family Serial")
340
+ bundle_id.update_capability(DRIVERKIT_SERIAL, enabled: on)
293
341
  end
294
342
 
295
- if options.nfc_tag_reading
296
- UI.message("\tNFC Tag Reading")
343
+ if options.driver_kit_hid_event_service
344
+ UI.message("\tDriverKit HID EventService")
345
+ bundle_id.update_capability(DRIVERKIT_HID_EVENT_SERVICE, enabled: on)
346
+ end
297
347
 
298
- if on
299
- app.update_service(Spaceship.app_service.nfc_tag_reading.on)
300
- else
301
- app.update_service(Spaceship.app_service.nfc_tag_reading.off)
302
- end
348
+ if options.driver_kit_transport_hid
349
+ UI.message("\tDriverKit Transport HID")
350
+ bundle_id.update_capability(DRIVERKIT_HID, enabled: on)
351
+ end
352
+
353
+ if options.multitasking_camera_access
354
+ UI.message("\tMultitasking Camera Access")
355
+ bundle_id.update_capability(IPAD_CAMERA_MULTITASKING, enabled: on)
356
+ end
357
+
358
+ if options.sf_universal_link_api
359
+ UI.message("\tSFUniversalLink API")
360
+ bundle_id.update_capability(SFUNIVERSALLINK_API, enabled: on)
361
+ end
362
+
363
+ if options.vp9_decoder
364
+ UI.message("\tVP9 Decoder")
365
+ bundle_id.update_capability(VP9_DECODER, enabled: on)
366
+ end
367
+
368
+ if options.music_kit
369
+ UI.message("\tMusicKit")
370
+ bundle_id.update_capability(MUSIC_KIT, enabled: on)
371
+ end
372
+
373
+ if options.shazam_kit
374
+ UI.message("\tShazamKit")
375
+ bundle_id.update_capability(SHAZAM_KIT, enabled: on)
376
+ end
377
+
378
+ if options.communication_notifications
379
+ UI.message("\tCommunication Notifications")
380
+ bundle_id.update_capability(USERNOTIFICATIONS_COMMUNICATION, enabled: on)
381
+ end
382
+
383
+ if options.group_activities
384
+ UI.message("\tGroup Activities")
385
+ bundle_id.update_capability(GROUP_ACTIVITIES, enabled: on)
386
+ end
387
+
388
+ if options.health_kit_estimate_recalibration
389
+ UI.message("\tHealthKit Estimate Recalibration")
390
+ bundle_id.update_capability(HEALTHKIT_RECALIBRATE_ESTIMATES, enabled: on)
391
+ end
392
+
393
+ if options.time_sensitive_notifications
394
+ UI.message("\tTime Sensitive Notifications")
395
+ bundle_id.update_capability(USERNOTIFICATIONS_TIMESENSITIVE, enabled: on)
303
396
  end
304
397
 
305
398
  updated
306
399
  end
307
400
 
308
- def app
309
- return @app if @app
310
-
401
+ def bundle_id
402
+ return @bundle_id if @bundle_id
311
403
  UI.message("Starting login with user '#{Produce.config[:username]}'")
312
404
  Spaceship.login(Produce.config[:username], nil)
313
405
  Spaceship.select_team
314
406
  UI.message("Successfully logged in")
315
-
316
- @app ||= Spaceship.app.find(Produce.config[:app_identifier].to_s)
407
+ @bundle_id ||= Spaceship::ConnectAPI::BundleId.find(Produce.config[:app_identifier].to_s)
317
408
  end
318
409
  end
319
410
  end