92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
|
# File 'produce/lib/produce/service.rb', line 92
def update(on, options)
updated = valid_services_for(options).count
if options.access_wifi
UI.message("\tAccess WiFi")
bundle_id.update_capability(ACCESS_WIFI_INFORMATION, enabled: on)
end
if options.app_attest
UI.message("\tApp Attest")
bundle_id.update_capability(APP_ATTEST, enabled: on)
end
if options.app_group
UI.message("\tApp Groups")
bundle_id.update_capability(APP_GROUPS, enabled: on)
end
if options.apple_pay
UI.message("\tApple Pay")
bundle_id.update_capability(APPLE_PAY, enabled: on)
end
if options.associated_domains
UI.message("\tAssociated Domains")
bundle_id.update_capability(ASSOCIATED_DOMAINS, enabled: on)
end
if options.auto_fill_credential
UI.message("\tAutoFill Credential")
bundle_id.update_capability(AUTOFILL_CREDENTIAL_PROVIDER, enabled: on)
end
if options.car_play_audio_app
UI.message("\tCarPlay Audio App")
bundle_id.update_capability(CARPLAY_PLAYABLE_CONTENT, enabled: on)
end
if options.car_play_messaging_app
UI.message("\tCarPlay Messaging App")
bundle_id.update_capability(CARPLAY_MESSAGING, enabled: on)
end
if options.car_play_navigation_app
UI.message("\tCarPlay Navigation App")
bundle_id.update_capability(CARPLAY_NAVIGATION, enabled: on)
end
if options.car_play_voip_calling_app
UI.message("\tCarPlay Voip Calling App")
bundle_id.update_capability(CARPLAY_VOIP, enabled: on)
end
if options.class_kit
UI.message("\tClassKit")
bundle_id.update_capability(CLASSKIT, enabled: on)
end
if options.critical_alerts
UI.message("\tCritical Alerts")
bundle_id.update_capability(CRITICAL_ALERTS, enabled: on)
end
if options.custom_network_protocol
UI.message("\tCustom Network Protocol")
bundle_id.update_capability(NETWORK_CUSTOM_PROTOCOL, enabled: on)
end
if options.data_protection
UI.message("\tData Protection")
settings = []
case options.data_protection
when "complete"
settings = build_settings_for(settings_key: DATA_PROTECTION_PERMISSION_LEVEL, options_key: COMPLETE_PROTECTION)
when "unlessopen"
settings = build_settings_for(settings_key: DATA_PROTECTION_PERMISSION_LEVEL, options_key: PROTECTED_UNLESS_OPEN)
when "untilfirstauth"
settings = build_settings_for(settings_key: DATA_PROTECTION_PERMISSION_LEVEL, options_key: PROTECTED_UNTIL_FIRST_USER_AUTH)
else
UI.user_error!("Unknown service '#{options.data_protection}'. Valid values: 'complete', 'unlessopen', 'untilfirstauth'") unless options.data_protection == true || options.data_protection == false
end
bundle_id.update_capability(DATA_PROTECTION, enabled: on, settings: settings)
end
if options.extended_virtual_address_space
UI.message("\tExtended Virtual Address Space")
bundle_id.update_capability(EXTENDED_VIRTUAL_ADDRESSING, enabled: on)
end
if options.family_controls
UI.message("\tFamily Controls")
bundle_id.update_capability(FAMILY_CONTROLS, enabled: on)
end
if options.file_provider_testing_mode
UI.message("\tFile Provider Testing Mode")
bundle_id.update_capability(FILEPROVIDER_TESTINGMODE, enabled: on)
end
if options.fonts
UI.message("\tFonts")
bundle_id.update_capability(FONT_INSTALLATION, enabled: on)
end
if options.game_center
UI.message("\tGame Center")
settings = []
case options.game_center
when "mac"
settings = build_settings_for(settings_key: GAME_CENTER_SETTING, options_key: GAME_CENTER_MAC)
when "ios"
settings = build_settings_for(settings_key: GAME_CENTER_SETTING, options_key: GAME_CENTER_IOS)
else
UI.user_error!("Unknown service '#{options.game_center}'. Valid values: 'ios', 'mac'") unless options.game_center == true || options.game_center == false
end
bundle_id.update_capability(GAME_CENTER, enabled: on, settings: settings)
end
if options.health_kit
UI.message("\tHealthKit")
bundle_id.update_capability(HEALTHKIT, enabled: on)
end
if options.hls_interstitial_preview
UI.message("\tHLS Interstitial Preview")
bundle_id.update_capability(HLS_INTERSTITIAL_PREVIEW, enabled: on)
end
if options.home_kit
UI.message("\tHomeKit")
bundle_id.update_capability(HOMEKIT, enabled: on)
end
if options.hotspot
UI.message("\tHotspot")
bundle_id.update_capability(HOT_SPOT, enabled: on)
end
if options.hotspot_helper
UI.message("\tHotspot Helper")
bundle_id.update_capability(HOTSPOT_HELPER_MANAGED, enabled: on)
end
if options.icloud
UI.message("\tiCloud")
settings = []
case options.icloud
when "xcode6_compatible"
settings = build_settings_for(settings_key: ICLOUD_VERSION, options_key: XCODE_6)
when "xcode5_compatible"
settings = build_settings_for(settings_key: ICLOUD_VERSION, options_key: XCODE_5)
else
UI.user_error!("Unknown service '#{options.icloud}'. Valid values: 'xcode6_compatible', 'xcode5_compatible', 'off'") unless options.icloud == true || options.icloud == false
end
bundle_id.update_capability(ICLOUD, enabled: on, settings: settings)
end
if options.in_app_purchase
UI.message("\tIn-App Purchase")
bundle_id.update_capability(IN_APP_PURCHASE, enabled: on)
end
if options.inter_app_audio
UI.message("\tInter-App Audio")
bundle_id.update_capability(INTER_APP_AUDIO, enabled: on)
end
if options.low_latency_hls
UI.message("\tLow Latency HLS")
bundle_id.update_capability(COREMEDIA_HLS_LOW_LATENCY, enabled: on)
end
if options.managed_associated_domains
UI.message("\tManaged Associated Domains")
bundle_id.update_capability(MDM_MANAGED_ASSOCIATED_DOMAINS, enabled: on)
end
if options.maps
UI.message("\tMaps")
bundle_id.update_capability(MAPS, enabled: on)
end
if options.multipath
UI.message("\tMultipath")
bundle_id.update_capability(MULTIPATH, enabled: on)
end
if options.network_extension
UI.message("\tNetwork Extension")
bundle_id.update_capability(NETWORK_EXTENSIONS, enabled: on)
end
if options.nfc_tag_reading
UI.message("\tNFC Tag Reading")
bundle_id.update_capability(NFC_TAG_READING, enabled: on)
end
if options.personal_vpn
UI.message("\tPersonal VPN")
bundle_id.update_capability(PERSONAL_VPN, enabled: on)
end
if options.push_notification
UI.message("\tPush Notifications")
bundle_id.update_capability(PUSH_NOTIFICATIONS, enabled: on)
end
if options.sign_in_with_apple
UI.message("\tSign In With Apple")
settings = build_settings_for(settings_key: APPLE_ID_AUTH_APP_CONSENT, options_key: PRIMARY_APP_CONSENT)
bundle_id.update_capability(APPLE_ID_AUTH, enabled: on, settings: settings)
end
if options.siri_kit
UI.message("\tSiriKit")
bundle_id.update_capability(SIRIKIT, enabled: on)
end
if options.system_extension
UI.message("\tSystem Extension")
bundle_id.update_capability(SYSTEM_EXTENSION_INSTALL, enabled: on)
end
if options.user_management
UI.message("\tUser Management")
bundle_id.update_capability(USER_MANAGEMENT, enabled: on)
end
if options.wallet
UI.message("\tWallet")
bundle_id.update_capability(WALLET, enabled: on)
end
if options.wireless_accessory
UI.message("\tWireless Accessory Configuration")
bundle_id.update_capability(WIRELESS_ACCESSORY_CONFIGURATION, enabled: on)
end
if options.driver_kit
UI.message("\tDriverKit")
bundle_id.update_capability(DRIVERKIT, enabled: on)
end
if options.driver_kit_endpoint_security
UI.message("\tDriverKit Endpoint Security")
bundle_id.update_capability(DRIVERKIT_ENDPOINT_SECURITY, enabled: on)
end
if options.driver_kit_family_hid_device
UI.message("\tDriverKit Family HID Device")
bundle_id.update_capability(DRIVERKIT_HID_DEVICE, enabled: on)
end
if options.driver_kit_family_networking
UI.message("\tDriverKit Family Networking")
bundle_id.update_capability(DRIVERKIT_NETWORKING, enabled: on)
end
if options.driver_kit_family_serial
UI.message("\tDriverKit Family Serial")
bundle_id.update_capability(DRIVERKIT_SERIAL, enabled: on)
end
if options.driver_kit_hid_event_service
UI.message("\tDriverKit HID EventService")
bundle_id.update_capability(DRIVERKIT_HID_EVENT_SERVICE, enabled: on)
end
if options.driver_kit_transport_hid
UI.message("\tDriverKit Transport HID")
bundle_id.update_capability(DRIVERKIT_HID, enabled: on)
end
if options.multitasking_camera_access
UI.message("\tMultitasking Camera Access")
bundle_id.update_capability(IPAD_CAMERA_MULTITASKING, enabled: on)
end
if options.sf_universal_link_api
UI.message("\tSFUniversalLink API")
bundle_id.update_capability(SFUNIVERSALLINK_API, enabled: on)
end
if options.vp9_decoder
UI.message("\tVP9 Decoder")
bundle_id.update_capability(VP9_DECODER, enabled: on)
end
if options.music_kit
UI.message("\tMusicKit")
bundle_id.update_capability(MUSIC_KIT, enabled: on)
end
if options.shazam_kit
UI.message("\tShazamKit")
bundle_id.update_capability(SHAZAM_KIT, enabled: on)
end
if options.communication_notifications
UI.message("\tCommunication Notifications")
bundle_id.update_capability(USERNOTIFICATIONS_COMMUNICATION, enabled: on)
end
if options.group_activities
UI.message("\tGroup Activities")
bundle_id.update_capability(GROUP_ACTIVITIES, enabled: on)
end
if options.health_kit_estimate_recalibration
UI.message("\tHealthKit Estimate Recalibration")
bundle_id.update_capability(HEALTHKIT_RECALIBRATE_ESTIMATES, enabled: on)
end
if options.time_sensitive_notifications
UI.message("\tTime Sensitive Notifications")
bundle_id.update_capability(USERNOTIFICATIONS_TIMESENSITIVE, enabled: on)
end
updated
end
|