fastlane 2.184.0 → 2.187.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +101 -94
- data/deliver/lib/deliver/upload_metadata.rb +1 -1
- data/fastlane/lib/fastlane/actions/adb.rb +1 -4
- data/fastlane/lib/fastlane/actions/adb_devices.rb +0 -1
- data/fastlane/lib/fastlane/actions/add_git_tag.rb +4 -4
- data/fastlane/lib/fastlane/actions/app_store_build_number.rb +3 -4
- data/fastlane/lib/fastlane/actions/app_store_connect_api_key.rb +1 -1
- data/fastlane/lib/fastlane/actions/appetize.rb +0 -7
- data/fastlane/lib/fastlane/actions/appetize_viewing_url_generator.rb +0 -11
- data/fastlane/lib/fastlane/actions/appium.rb +40 -65
- data/fastlane/lib/fastlane/actions/apteligent.rb +3 -2
- data/fastlane/lib/fastlane/actions/artifactory.rb +5 -6
- data/fastlane/lib/fastlane/actions/automatic_code_signing.rb +6 -11
- data/fastlane/lib/fastlane/actions/backup_xcarchive.rb +2 -2
- data/fastlane/lib/fastlane/actions/badge.rb +9 -13
- data/fastlane/lib/fastlane/actions/build_and_upload_to_appetize.rb +1 -3
- data/fastlane/lib/fastlane/actions/bundle_install.rb +8 -10
- data/fastlane/lib/fastlane/actions/carthage.rb +2 -16
- data/fastlane/lib/fastlane/actions/changelog_from_git_commits.rb +8 -17
- data/fastlane/lib/fastlane/actions/chatwork.rb +3 -2
- data/fastlane/lib/fastlane/actions/clean_build_artifacts.rb +0 -1
- data/fastlane/lib/fastlane/actions/clean_cocoapods_cache.rb +0 -1
- data/fastlane/lib/fastlane/actions/cloc.rb +9 -13
- data/fastlane/lib/fastlane/actions/cocoapods.rb +9 -15
- data/fastlane/lib/fastlane/actions/commit_github_file.rb +1 -3
- data/fastlane/lib/fastlane/actions/commit_version_bump.rb +6 -7
- data/fastlane/lib/fastlane/actions/copy_artifacts.rb +3 -4
- data/fastlane/lib/fastlane/actions/crashlytics.rb +7 -11
- data/fastlane/lib/fastlane/actions/create_app_on_managed_play_store.rb +70 -76
- data/fastlane/lib/fastlane/actions/create_keychain.rb +13 -11
- data/fastlane/lib/fastlane/actions/create_pull_request.rb +0 -9
- data/fastlane/lib/fastlane/actions/danger.rb +6 -11
- data/fastlane/lib/fastlane/actions/deploygate.rb +1 -2
- data/fastlane/lib/fastlane/actions/docs/build_app.md +1 -1
- data/fastlane/lib/fastlane/actions/docs/capture_android_screenshots.md +26 -27
- data/fastlane/lib/fastlane/actions/docs/capture_ios_screenshots.md +2 -2
- data/fastlane/lib/fastlane/actions/docs/create_app_online.md +171 -67
- data/fastlane/lib/fastlane/actions/docs/upload_to_app_store.md.erb +4 -5
- data/fastlane/lib/fastlane/actions/docs/upload_to_testflight.md +10 -4
- data/fastlane/lib/fastlane/actions/download_app_privacy_details_from_app_store.rb +1 -1
- data/fastlane/lib/fastlane/actions/download_dsyms.rb +3 -4
- data/fastlane/lib/fastlane/actions/dsym_zip.rb +1 -1
- data/fastlane/lib/fastlane/actions/ensure_git_branch.rb +0 -1
- data/fastlane/lib/fastlane/actions/ensure_git_status_clean.rb +3 -4
- data/fastlane/lib/fastlane/actions/ensure_no_debug_code.rb +3 -5
- data/fastlane/lib/fastlane/actions/ensure_xcode_version.rb +1 -2
- data/fastlane/lib/fastlane/actions/environment_variable.rb +13 -21
- data/fastlane/lib/fastlane/actions/erb.rb +2 -5
- data/fastlane/lib/fastlane/actions/get_build_number_repository.rb +1 -1
- data/fastlane/lib/fastlane/actions/get_ipa_info_plist_value.rb +0 -1
- data/fastlane/lib/fastlane/actions/get_managed_play_store_publishing_rights.rb +29 -34
- data/fastlane/lib/fastlane/actions/get_push_certificate.rb +1 -1
- data/fastlane/lib/fastlane/actions/git_add.rb +5 -10
- data/fastlane/lib/fastlane/actions/git_commit.rb +2 -6
- data/fastlane/lib/fastlane/actions/git_remote_branch.rb +57 -0
- data/fastlane/lib/fastlane/actions/github_api.rb +2 -5
- data/fastlane/lib/fastlane/actions/gradle.rb +11 -19
- data/fastlane/lib/fastlane/actions/hg_commit_version_bump.rb +1 -1
- data/fastlane/lib/fastlane/actions/hg_push.rb +1 -1
- data/fastlane/lib/fastlane/actions/hipchat.rb +4 -5
- data/fastlane/lib/fastlane/actions/hockey.rb +5 -12
- data/fastlane/lib/fastlane/actions/ifttt.rb +3 -6
- data/fastlane/lib/fastlane/actions/import_from_git.rb +2 -4
- data/fastlane/lib/fastlane/actions/increment_build_number.rb +1 -2
- data/fastlane/lib/fastlane/actions/install_on_device.rb +3 -6
- data/fastlane/lib/fastlane/actions/installr.rb +22 -25
- data/fastlane/lib/fastlane/actions/ipa.rb +2 -2
- data/fastlane/lib/fastlane/actions/jazzy.rb +8 -14
- data/fastlane/lib/fastlane/actions/latest_testflight_build_number.rb +3 -4
- data/fastlane/lib/fastlane/actions/lcov.rb +0 -4
- data/fastlane/lib/fastlane/actions/mailgun.rb +21 -27
- data/fastlane/lib/fastlane/actions/make_changelog_from_jenkins.rb +1 -1
- data/fastlane/lib/fastlane/actions/modify_services.rb +59 -24
- data/fastlane/lib/fastlane/actions/nexus_upload.rb +2 -2
- data/fastlane/lib/fastlane/actions/notarize.rb +1 -4
- data/fastlane/lib/fastlane/actions/number_of_commits.rb +1 -1
- data/fastlane/lib/fastlane/actions/oclint.rb +15 -14
- data/fastlane/lib/fastlane/actions/pod_push.rb +0 -2
- data/fastlane/lib/fastlane/actions/podio_item.rb +0 -7
- data/fastlane/lib/fastlane/actions/prompt.rb +3 -4
- data/fastlane/lib/fastlane/actions/push_git_tags.rb +1 -1
- data/fastlane/lib/fastlane/actions/push_to_git_remote.rb +5 -1
- data/fastlane/lib/fastlane/actions/puts.rb +1 -2
- data/fastlane/lib/fastlane/actions/register_devices.rb +0 -1
- data/fastlane/lib/fastlane/actions/reset_git_repo.rb +5 -8
- data/fastlane/lib/fastlane/actions/reset_simulator_contents.rb +0 -2
- data/fastlane/lib/fastlane/actions/resign.rb +2 -9
- data/fastlane/lib/fastlane/actions/rsync.rb +3 -6
- data/fastlane/lib/fastlane/actions/run_tests.rb +1 -1
- data/fastlane/lib/fastlane/actions/s3.rb +1 -1
- data/fastlane/lib/fastlane/actions/say.rb +2 -3
- data/fastlane/lib/fastlane/actions/scp.rb +4 -10
- data/fastlane/lib/fastlane/actions/set_build_number_repository.rb +1 -1
- data/fastlane/lib/fastlane/actions/set_changelog.rb +1 -1
- data/fastlane/lib/fastlane/actions/set_github_release.rb +2 -8
- data/fastlane/lib/fastlane/actions/set_info_plist_value.rb +1 -1
- data/fastlane/lib/fastlane/actions/set_pod_key.rb +3 -4
- data/fastlane/lib/fastlane/actions/setup_ci.rb +1 -2
- data/fastlane/lib/fastlane/actions/setup_circle_ci.rb +1 -1
- data/fastlane/lib/fastlane/actions/setup_jenkins.rb +7 -12
- data/fastlane/lib/fastlane/actions/setup_travis.rb +1 -1
- data/fastlane/lib/fastlane/actions/sh.rb +2 -4
- data/fastlane/lib/fastlane/actions/slack.rb +6 -8
- data/fastlane/lib/fastlane/actions/slather.rb +3 -19
- data/fastlane/lib/fastlane/actions/sonar.rb +12 -19
- data/fastlane/lib/fastlane/actions/sourcedocs.rb +62 -98
- data/fastlane/lib/fastlane/actions/splunkmint.rb +2 -2
- data/fastlane/lib/fastlane/actions/spm.rb +3 -3
- data/fastlane/lib/fastlane/actions/ssh.rb +5 -10
- data/fastlane/lib/fastlane/actions/swiftlint.rb +1 -11
- data/fastlane/lib/fastlane/actions/testfairy.rb +0 -1
- data/fastlane/lib/fastlane/actions/tryouts.rb +2 -3
- data/fastlane/lib/fastlane/actions/twitter.rb +0 -5
- data/fastlane/lib/fastlane/actions/unlock_keychain.rb +3 -3
- data/fastlane/lib/fastlane/actions/update_app_group_identifiers.rb +1 -4
- data/fastlane/lib/fastlane/actions/update_code_signing_settings.rb +8 -15
- data/fastlane/lib/fastlane/actions/update_fastlane.rb +2 -2
- data/fastlane/lib/fastlane/documentation/docs_generator.rb +1 -1
- data/fastlane/lib/fastlane/environment_printer.rb +1 -0
- data/fastlane/lib/fastlane/helper/crashlytics_helper.rb +4 -4
- data/fastlane/lib/fastlane/helper/git_helper.rb +24 -7
- data/fastlane/lib/fastlane/plugins/plugin_manager.rb +1 -1
- data/fastlane/lib/fastlane/setup/setup_ios.rb +3 -3
- data/fastlane/lib/fastlane/swift_fastlane_function.rb +6 -5
- data/fastlane/lib/fastlane/version.rb +1 -1
- data/fastlane/swift/Deliverfile.swift +1 -1
- data/fastlane/swift/DeliverfileProtocol.swift +1 -1
- data/fastlane/swift/Fastlane.swift +3786 -3563
- data/fastlane/swift/Gymfile.swift +1 -1
- data/fastlane/swift/GymfileProtocol.swift +1 -1
- data/fastlane/swift/Matchfile.swift +1 -1
- data/fastlane/swift/MatchfileProtocol.swift +1 -1
- data/fastlane/swift/Precheckfile.swift +1 -1
- data/fastlane/swift/PrecheckfileProtocol.swift +1 -1
- data/fastlane/swift/Scanfile.swift +1 -1
- data/fastlane/swift/ScanfileProtocol.swift +1 -1
- data/fastlane/swift/Screengrabfile.swift +1 -1
- data/fastlane/swift/ScreengrabfileProtocol.swift +4 -4
- data/fastlane/swift/Snapshotfile.swift +1 -1
- data/fastlane/swift/SnapshotfileProtocol.swift +1 -1
- data/fastlane/swift/formatting/Brewfile.lock.json +11 -11
- data/fastlane_core/lib/fastlane_core/build_watcher.rb +2 -2
- data/fastlane_core/lib/fastlane_core/configuration/config_item.rb +16 -3
- data/fastlane_core/lib/fastlane_core/helper.rb +12 -0
- data/fastlane_core/lib/fastlane_core/print_table.rb +5 -3
- data/fastlane_core/lib/fastlane_core/project.rb +7 -3
- data/match/lib/match/importer.rb +3 -0
- data/match/lib/match/nuke.rb +2 -3
- data/match/lib/match/options.rb +1 -0
- data/pilot/lib/pilot/build_manager.rb +2 -1
- data/pilot/lib/pilot/manager.rb +4 -1
- data/pilot/lib/pilot/options.rb +2 -2
- data/produce/lib/produce/commands_generator.rb +99 -27
- data/produce/lib/produce/developer_center.rb +42 -4
- data/produce/lib/produce/options.rb +1 -1
- data/produce/lib/produce/service.rb +270 -179
- data/screengrab/lib/screengrab/android_environment.rb +2 -52
- data/screengrab/lib/screengrab/dependency_checker.rb +0 -20
- data/screengrab/lib/screengrab/options.rb +5 -2
- data/screengrab/lib/screengrab/runner.rb +108 -106
- data/sigh/lib/assets/resign.sh +8 -19
- data/snapshot/lib/assets/SnapfileTemplate +2 -1
- data/snapshot/lib/assets/SnapfileTemplate.swift +2 -1
- data/snapshot/lib/assets/SnapshotHelper.swift +14 -10
- data/snapshot/lib/snapshot/reports_generator.rb +3 -1
- data/snapshot/lib/snapshot/test_command_generator.rb +17 -3
- data/spaceship/lib/spaceship/connect_api/api_client.rb +30 -5
- data/spaceship/lib/spaceship/connect_api/models/age_rating_declaration.rb +2 -1
- data/spaceship/lib/spaceship/connect_api/models/beta_group.rb +3 -1
- data/spaceship/lib/spaceship/connect_api/models/beta_tester.rb +3 -1
- data/spaceship/lib/spaceship/connect_api/models/build.rb +5 -1
- data/spaceship/lib/spaceship/connect_api/models/bundle_id.rb +8 -0
- data/spaceship/lib/spaceship/connect_api/models/bundle_id_capability.rb +58 -17
- data/spaceship/lib/spaceship/connect_api/provisioning/provisioning.rb +41 -1
- data/spaceship/lib/spaceship/connect_api/testflight/testflight.rb +13 -0
- data/spaceship/lib/spaceship/spaceauth_runner.rb +19 -6
- metadata +21 -21
- data/fastlane/lib/fastlane/actions/.git_commit.rb.swp +0 -0
- data/spaceship/lib/spaceship/connect_api/models/.age_rating_declaration.rb.swp +0 -0
@@ -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
|
-
|
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
|
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 '#{
|
25
|
+
UI.success("[DevCenter] App found '#{bundle_id.name}'")
|
21
26
|
UI.message("Enabling services")
|
22
|
-
enabled = update(true,
|
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
|
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 '#{
|
37
|
+
UI.success("[DevCenter] App found '#{bundle_id.name}'")
|
33
38
|
UI.message("Disabling services")
|
34
|
-
disabled = update(false,
|
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, :
|
40
|
-
:
|
41
|
-
:
|
42
|
-
:
|
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
|
-
|
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
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
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
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
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
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
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
|
-
|
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
|
-
|
122
|
-
|
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
|
-
|
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.
|
197
|
+
if options.health_kit
|
129
198
|
UI.message("\tHealthKit")
|
199
|
+
bundle_id.update_capability(HEALTHKIT, enabled: on)
|
200
|
+
end
|
130
201
|
|
131
|
-
|
132
|
-
|
133
|
-
|
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.
|
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.
|
149
|
-
UI.message("\
|
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.
|
159
|
-
UI.message("\
|
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
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
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
|
-
|
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
|
-
|
201
|
-
|
202
|
-
|
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.
|
208
|
-
UI.message("\
|
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
|
-
|
211
|
-
|
212
|
-
|
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
|
-
|
218
|
-
|
219
|
-
|
262
|
+
if options.multipath
|
263
|
+
UI.message("\tMultipath")
|
264
|
+
bundle_id.update_capability(MULTIPATH, enabled: on)
|
265
|
+
end
|
220
266
|
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
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
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
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.
|
293
|
+
if options.siri_kit
|
245
294
|
UI.message("\tSiriKit")
|
295
|
+
bundle_id.update_capability(SIRIKIT, enabled: on)
|
296
|
+
end
|
246
297
|
|
247
|
-
|
248
|
-
|
249
|
-
|
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
|
-
|
255
|
-
|
256
|
-
|
303
|
+
if options.user_management
|
304
|
+
UI.message("\tUser Management")
|
305
|
+
bundle_id.update_capability(USER_MANAGEMENT, enabled: on)
|
306
|
+
end
|
257
307
|
|
258
|
-
|
259
|
-
|
260
|
-
|
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.
|
266
|
-
UI.message("\
|
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
|
-
|
269
|
-
|
270
|
-
|
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.
|
276
|
-
UI.message("\
|
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
|
-
|
279
|
-
|
280
|
-
|
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.
|
286
|
-
UI.message("\
|
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
|
-
|
289
|
-
|
290
|
-
|
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.
|
296
|
-
UI.message("\
|
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
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
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
|
309
|
-
return @
|
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
|