You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 31, 2023. It is now read-only.
@@ -29,197 +29,202 @@ This project is a [_fastlane_](https://github.com/fastlane/fastlane) plugin. To
29
29
fastlane add_plugin branch
30
30
```
31
31
32
-
## setup_branch action
32
+
<!-- The following is generated. Do not edit by hand. Run fastlane readme to -->
33
+
<!-- regenerate this section. -->
34
+
<!-- BEGIN ACTION REFERENCE -->
35
+
### setup_branch action
36
+
37
+
```Ruby
38
+
setup_branch
39
+
```
33
40
34
41
Integrates the Branch SDK into a native app project. This currently supports iOS only.
35
42
It will infer the project location if there is exactly one .xcodeproj anywhere under
36
43
the current directory, excluding any in a Pods or Carthage folder. Otherwise, specify
37
-
the project location using the `--xcodeproj` option, or the CLI will prompt you for the
44
+
the project location using the `xcodeproj` option, or the CLI will prompt you for the
38
45
location.
39
46
40
47
If a Podfile or Cartfile is detected, the Branch SDK will be added to the relevant
41
48
configuration file and the dependencies updated to include the Branch framework.
42
-
This behavior may be suppressed using `--no-add-sdk`. If no Podfile or Cartfile
49
+
This behavior may be suppressed using `no_add_sdk`. If no Podfile or Cartfile
43
50
is found, and Branch.framework is not already among the project's dependencies,
44
51
you will be prompted for a number of choices, including setting up CocoaPods or
45
52
Carthage for the project or directly installing the Branch.framework.
46
53
47
54
By default, all supplied Universal Link domains are validated. If validation passes,
48
55
the setup continues. If validation fails, no further action is taken. Suppress
49
-
validation using `--no-validate` or force changes when validation fails using
50
-
`--force`.
56
+
validation using `no_validate` or force changes when validation fails using
57
+
`force`.
51
58
52
59
By default, this command will look for the first app target in the project. Test
53
-
targets are not supported. To set up an extension target, supply the `--target` option.
60
+
targets are not supported. To set up an extension target, supply the `target` option.
54
61
55
62
All relevant target settings are modified. The Branch keys are added to the Info.plist,
56
-
along with the `branch_universal_link_domains` key for custom domains (when `--domains`
63
+
along with the `branch_universal_link_domains` key for custom domains (when `domains`
57
64
is used). For app targets, all domains are added to the project's Associated Domains
58
65
entitlement. An entitlements file is also added for app targets if none is found.
59
-
Optionally, if `--frameworks` is specified, this command can add a list of system
66
+
Optionally, if `frameworks` is specified, this command can add a list of system
60
67
frameworks to the target's dependencies (e.g., AdSupport, CoreSpotlight, SafariServices).
61
68
62
69
A language-specific patch is applied to the AppDelegate (Swift or Objective-C).
63
-
This can be suppressed using `--no-patch-source`.
70
+
This can be suppressed using `no_patch_source`.
64
71
65
72
#### Prerequisites
66
73
67
-
Before using this command, make sure to set up your app in the [Branch Dashboard](https://dashboard.branch.io). See https://docs.branch.io/pages/dashboard/integrate/ for details. To use the `setup` command, you need:
74
+
Before using this command, make sure to set up your app in the Branch Dashboard
75
+
(https://dashboard.branch.io). See https://docs.branch.io/pages/dashboard/integrate/
76
+
for details. To use the `setup` command, you need:
68
77
69
78
- Branch key(s), either live, test or both
70
79
- Domain name(s) used for Branch links
71
80
- Location of your Xcode project (may be inferred in simple projects)
72
81
73
-
If using the `--commit` option, `git` is required. If not using `--no-add-sdk`,
82
+
If using the `commit` option, `git` is required. If not using `no_add_sdk`,
74
83
the `pod` or `carthage` command may be required. If not found, the CLI will
75
84
offer to install and set up these command-line tools for you. Alternately, you can arrange
76
85
that the relevant commands are available in your `PATH`.
77
86
78
-
```ruby
87
+
All parameters are optional. A live key or test key, or both is required, as well
88
+
as at least one domain. Specify `live_key`, `test_key` or both and `app_link_subdomain`,
89
+
`domains` or both. If these are not specified, this command will prompt you
90
+
for this information.
91
+
92
+
See https://github.com/BranchMetrics/branch_io_cli#setup-command for more information.
|live_key|Branch live key|BRANCH_LIVE_KEY|Boolean||
100
+
|test_key|Branch test key|BRANCH_TEST_KEY|Boolean||
101
+
|domains|Comma-separated list of custom domain(s) or non-Branch domain(s)|BRANCH_DOMAINS|Boolean||
102
+
|app_link_subdomain|Branch app.link subdomain, e.g. myapp for myapp.app.link|BRANCH_APP_LINK_SUBDOMAIN|Boolean||
103
+
|uri_scheme|Custom URI scheme used in the Branch Dashboard for this app|BRANCH_URI_SCHEME|Boolean||
104
+
|setting|Use a custom build setting for the Branch key (default: Use Info.plist)|BRANCH_SETTING|Boolean||
105
+
|test_configurations|List of configurations that use the test key with a user-defined setting (default: Debug configurations)|BRANCH_TEST_CONFIGURATIONS|Boolean||
106
+
|xcodeproj|Path to an Xcode project to update|BRANCH_XCODEPROJ|Boolean||
107
+
|target|Name of a target to modify in the Xcode project|BRANCH_TARGET|Boolean||
108
+
|podfile|Path to the Podfile for the project|BRANCH_PODFILE|Boolean||
109
+
|cartfile|Path to the Cartfile for the project|BRANCH_CARTFILE|Boolean||
110
+
|carthage_command|Command to run when installing from Carthage|BRANCH_CARTHAGE_COMMAND|Boolean|update --platform ios|
111
+
|frameworks|Comma-separated list of system frameworks to add to the project|BRANCH_FRAMEWORKS|Boolean||
112
+
|pod_repo_update|Update the local podspec repo before installing|BRANCH_POD_REPO_UPDATE||true|
113
+
|validate|Validate Universal Link configuration|BRANCH_VALIDATE||true|
114
+
|force|Update project even if Universal Link validation fails|BRANCH_FORCE||false|
115
+
|add_sdk|Add the Branch framework to the project|BRANCH_ADD_SDK||true|
116
+
|patch_source|Add Branch SDK calls to the AppDelegate|BRANCH_PATCH_SOURCE||true|
117
+
|commit|Commit the results to Git if non-blank|BRANCH_COMMIT|Boolean||
118
+
|confirm|Confirm configuration before proceeding|BRANCH_CONFIRM||true|
119
+
120
+
121
+
#### Examples
122
+
123
+
```Ruby
79
124
setup_branch(
80
125
live_key:"key_live_xxxx",
81
126
test_key:"key_test_yyyy",
82
127
app_link_subdomain:"myapp",
83
128
uri_scheme:"myscheme",
84
129
xcodeproj:"MyIOSApp.xcodeproj"
85
130
)
131
+
86
132
```
87
133
88
-
Use the `:domains` parameter to specify custom domains, including non-Branch domains
89
-
```ruby
90
-
setup_branch(
91
-
live_key:"key_live_xxxx",
92
-
domains:%w{example.com www.example.com}
93
-
xcodeproj:"MyIOSApp.xcodeproj"
94
-
)
134
+
135
+
136
+
137
+
### validate_universal_links action
138
+
139
+
```Ruby
140
+
validate_universal_links
95
141
```
96
142
97
-
Available options:
143
+
This command validates all Universal Link domains configured in a project without making any
144
+
modification. It validates both Branch and non-Branch domains. Unlike web-based Universal
145
+
Link validators, this command operates directly on the project. It finds the bundle and
146
+
signing team identifiers in the project as well as the app's Associated Domains. It requests
147
+
the apple-app-site-association file for each domain and validates the file against the
|:live_key|The Branch live key to use (:live_key or :test_key is required)|BRANCH_LIVE_KEY|string||
102
-
|:test_key|The Branch test key to use (:live_key or :test_key is required)|BRANCH_TEST_KEY|string||
103
-
|:app_link_subdomain|An app.link subdomain to use (:app_link_subdomain or :domains is required. The union of the two sets of domains will be used.)|BRANCH_APP_LINK_SUBDOMAIN|string||
104
-
|:domains|A list of domains (custom domains or Branch domains) to use (:app_link_subdomain or :domains is required. The union of the two sets of domains will be used.)|BRANCH_DOMAINS|array of strings or comma-separated string||
105
-
|:uri_scheme|A URI scheme to add to the manifest|BRANCH_URI_SCHEME|string||
106
-
|:xcodeproj|Path to a .xcodeproj directory to use. (:xcodeproj, :android_project_path or :android_manifest_path is required.)|BRANCH_XCODEPROJ|string||
107
-
|:target|Name of the target to use in the Xcode project (iOS only; optional)|BRANCH_TARGET|string||
108
-
|:validate|Determines whether to validate the resulting Universal Link configuration before modifying the project|BRANCH_VALIDATE|boolean|true|
109
-
|:force|Update project(s) even if Universal Link validation fails|BRANCH_FORCE_UPDATE|boolean|false|
110
-
|:commit|Set to true to commit changes to Git; set to a string to commit with a custom message|BRANCH_COMMIT_CHANGES|boolean or string|false|
111
-
|:frameworks|A list of system frameworks to add to the target that uses the Branch SDK (iOS only)|BRANCH_FRAMEWORKS|array|[]|
112
-
|:add_sdk|Set to false to disable automatic integration of the Branch SDK|BRANCH_ADD_SDK|boolean|true|
113
-
|:podfile|Path to a Podfile to update (iOS only)|BRANCH_PODFILE|string||
114
-
|:patch_source|Set to false to disable automatic source-code patching|BRANCH_PATCH_SOURCE|boolean|true|
115
-
|:pod_repo_update|Set to false to disable update of local podspec repo before pod install|BRANCH_POD_REPO_UPDATE|boolean|true|
116
-
|:cartfile|Path to a Cartfile to update (iOS only)|BRANCH_CARTFILE|string||
117
-
|:carthage_command|Command to use when installing with Carthage|BRANCH_CARTHAGE_COMMAND|string|update --platform ios|
150
+
Only app targets are supported for this command. By default, it will validate the first.
151
+
If your project has multiple app targets, specify the `target` option to validate other
152
+
targets.
118
153
119
-
Individually, all parameters are optional, but the following conditions apply:
154
+
All parameters are optional. If `domains` is specified, the list of Universal Link domains in
155
+
the Associated Domains entitlement must exactly match this list, without regard to order. If
156
+
no `domains` are provided, validation passes if at least one Universal Link domain is
157
+
configured and passes validation, and no Universal Link domain is present that does not pass
158
+
validation.
120
159
121
-
-:live_key or :test_key must be specified.
122
-
-:app_link_subdomain or :domains must be specified.
160
+
See https://github.com/BranchMetrics/branch_io_cli#validate-command for more information.
123
161
124
-
If these parameters are not specified, you will be prompted for them.
125
162
126
-
This action also supports an optional Branchfile to specify configuration options.
127
-
See the sample [Branchfile](./fastlane/Branchfile) in the fastlane subdirectory of this repo.
|:xcodeproj|Path to a .xcodeproj directory to use|BRANCH_XCODEPROJ|string||
156
-
|:target|Name of the target to use in the Xcode project|BRANCH_TARGET|string||
157
-
|:domains|A list of domains (custom domains or Branch domains) that must be present in the project.|BRANCH_DOMAINS|array of strings or comma-separated string||
158
-
159
-
All parameters are optional. Without any parameters, the action looks for a single .xcodeproj
160
-
folder (with the exception of a Pods project) and reports an error if none or more than one is found.
161
-
It uses the first non-test, non-extension target in that project.
162
-
163
-
If the :domains parameter is not provided, validation will pass as long as there is at least
164
-
one Universal Link domain configured for the target, and all Universal Link domains pass
165
-
AASA validation. If the the :domains parameter is provided, the Universal Link domains in
166
-
the project must also match the value of this parameter without regard to order.
167
190
168
-
This action does not use the Branchfile.
169
191
170
-
## Examples
171
192
172
-
There is an example [Fastfile](./fastlane/Fastfile) in this repo that defines a number of
173
-
example lanes. Be sure to run `bundle install` before trying any of the examples.
0 commit comments