Class: Fastlane::Actions::UpdateKeychainAccessGroupsAction
Constant Summary
Fastlane::Action::AVAILABLE_CATEGORIES, Fastlane::Action::RETURN_TYPES
Class Method Summary
collapse
action_name, author, deprecated_notes, lane_context, method_missing, other_action, return_type, return_value, sample_return_value, shell_out_should_use_bundle_exec?, step_text
Class Method Details
.authors ⇒ Object
69
70
71
|
# File 'fastlane/lib/fastlane/actions/update_keychain_access_groups.rb', line 69
def self.authors
["yutae"]
end
|
.available_options ⇒ Object
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
|
# File 'fastlane/lib/fastlane/actions/update_keychain_access_groups.rb', line 47
def self.available_options
[
FastlaneCore::ConfigItem.new(key: :entitlements_file,
env_name: "FL_UPDATE_KEYCHAIN_ACCESS_GROUPS_ENTITLEMENTS_FILE_PATH", description: "The path to the entitlement file which contains the keychain access groups", verify_block: proc do |value|
UI.user_error!("Please pass a path to an entitlements file. ") unless value.include?(".entitlements")
UI.user_error!("Could not find entitlements file") if !File.exist?(value) && !Helper.test?
end),
FastlaneCore::ConfigItem.new(key: :identifiers,
env_name: "FL_UPDATE_KEYCHAIN_ACCESS_GROUPS_IDENTIFIERS",
description: "An Array of unique identifiers for the keychain access groups. Eg. ['your.keychain.access.groups.identifiers']",
type: Array)
]
end
|
.category ⇒ Object
86
87
88
|
# File 'fastlane/lib/fastlane/actions/update_keychain_access_groups.rb', line 86
def self.category
:project
end
|
.description ⇒ Object
39
40
41
|
# File 'fastlane/lib/fastlane/actions/update_keychain_access_groups.rb', line 39
def self.description
"This action changes the keychain access groups in the entitlements file"
end
|
.details ⇒ Object
43
44
45
|
# File 'fastlane/lib/fastlane/actions/update_keychain_access_groups.rb', line 43
def self.details
"Updates the Keychain Group Access Groups in the given Entitlements file, so you can have keychain access groups for the app store build and keychain access groups for an enterprise build."
end
|
.example_code ⇒ Object
77
78
79
80
81
82
83
84
|
# File 'fastlane/lib/fastlane/actions/update_keychain_access_groups.rb', line 77
def self.example_code
[
'update_keychain_access_groups(
entitlements_file: "/path/to/entitlements_file.entitlements",
identifiers: ["your.keychain.access.groups.identifiers"]
)'
]
end
|
.is_supported?(platform) ⇒ Boolean
73
74
75
|
# File 'fastlane/lib/fastlane/actions/update_keychain_access_groups.rb', line 73
def self.is_supported?(platform)
platform == :ios
end
|
.output ⇒ Object
63
64
65
66
67
|
# File 'fastlane/lib/fastlane/actions/update_keychain_access_groups.rb', line 63
def self.output
[
['KEYCHAIN_ACCESS_GROUPS', 'The new Keychain Access Groups']
]
end
|
.run(params) ⇒ Object
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
# File 'fastlane/lib/fastlane/actions/update_keychain_access_groups.rb', line 10
def self.run(params)
UI.message("Entitlements File: #{params[:entitlements_file]}")
UI.message("New keychain access groups: #{params[:identifiers]}")
entitlements_file = params[:entitlements_file]
UI.user_error!("Could not find entitlements file at path '#{entitlements_file}'") unless File.exist?(entitlements_file)
result = Plist.parse_xml(entitlements_file)
UI.user_error!("Entitlements file at '#{entitlements_file}' cannot be parsed.") unless result
keychain_access_groups_key = 'keychain-access-groups'
keychain_access_groups_field = result[keychain_access_groups_key]
UI.user_error!("No existing keychain access groups field specified. Please specify an keychain access groups in the entitlements file.") unless keychain_access_groups_field
UI.message("Old keychain access groups: #{keychain_access_groups_field}")
result[keychain_access_groups_key] = params[:identifiers]
result.save_plist(entitlements_file)
UI.message("New keychain access groups: #{result[keychain_access_groups_key]}")
Actions.lane_context[SharedValues::KEYCHAIN_ACCESS_GROUPS] = result[keychain_access_groups_key]
end
|