branch_io_cli 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +6 -1
- data/lib/branch_io_cli/cli.rb +70 -3
- data/lib/branch_io_cli/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3560ddd196fc88c52244907effc9b9df323d795d
|
4
|
+
data.tar.gz: 8a4dec94f87efeb5b2905bfe3c1804644b89bb2a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bc8f5aba7438ec7040f44c0e7304d014d8751f739d3a3067947819dcff599f01121cb00670f858a7987b83166960fcb45a77942801537c576975c30ad0f312cb
|
7
|
+
data.tar.gz: acabb7d24be91e51671eeaa3c56ad74ebeda167691084888358296ce096e4b3f93875f26507d622f8091c7c58134a3f09fbc27901936c25aadfd7c9a0436da11
|
data/README.md
CHANGED
@@ -65,7 +65,12 @@ Before using this command, make sure to set up your app in the [Branch Dashboard
|
|
65
65
|
|
66
66
|
- Branch key(s), either live, test or both
|
67
67
|
- Domain name(s) used for Branch links
|
68
|
-
- Location of your Xcode project
|
68
|
+
- Location of your Xcode project (may be inferred in simple projects)
|
69
|
+
|
70
|
+
To use the `--commit` option, you must have the `git` command available in your path.
|
71
|
+
|
72
|
+
To add the SDK with CocoaPods or Carthage, you must have the `pod` or `carthage`
|
73
|
+
command, respectively, available in your path.
|
69
74
|
|
70
75
|
#### Options
|
71
76
|
|
data/lib/branch_io_cli/cli.rb
CHANGED
@@ -8,11 +8,63 @@ module BranchIOCLI
|
|
8
8
|
def run
|
9
9
|
program :name, "Branch.io command-line interface"
|
10
10
|
program :version, VERSION
|
11
|
-
program :description,
|
11
|
+
program :description, <<EOF
|
12
|
+
Command-line tool to integrate the Branch SDK into mobile app projects (currently
|
13
|
+
iOS only) and validate Universal Link domains
|
14
|
+
EOF
|
12
15
|
|
13
16
|
command :setup do |c|
|
14
17
|
c.syntax = "branch_io setup [OPTIONS]"
|
15
|
-
c.
|
18
|
+
c.summary = "Integrates the Branch SDK into a native app project"
|
19
|
+
c.description = <<EOF
|
20
|
+
Integrates the Branch SDK into a native app project. This currently supports iOS only.
|
21
|
+
It will infer the project location if there is exactly one .xcodeproj anywhere under
|
22
|
+
the current directory, excluding any in a Pods or Carthage folder. Otherwise, specify
|
23
|
+
the project location using the <%= color('--xcodeproj', BOLD) %> option.
|
24
|
+
|
25
|
+
If a Podfile or Cartfile is detected, the Branch SDK will be added to the relevant
|
26
|
+
configuration file and the dependencies updated to include the Branch framework.
|
27
|
+
This behavior may be suppressed using <%= color('--no_add_sdk', BOLD) %>. If no Podfile or Cartfile
|
28
|
+
is found, the SDK dependency must be added manually. This will improve in a future
|
29
|
+
release.
|
30
|
+
|
31
|
+
By default, all supplied Universal Link domains are validated. If validation passes,
|
32
|
+
the setup continues. If validation fails, no further action is taken. Suppress
|
33
|
+
validation using <%= color('--no_validate', BOLD) %> or force changes when validation fails using
|
34
|
+
<%= color('--force', BOLD) %>.
|
35
|
+
|
36
|
+
All relevant project settings are modified. The Branch keys are added to the Info.plist,
|
37
|
+
along with the <%= color('branch_universal_link_domains', BOLD) %> key for custom domains (when <%= color('--domains', BOLD) %>
|
38
|
+
is used). All domains are added to the project's Associated Domains entitlements.
|
39
|
+
An entitlements file is added if none is found. Optionally, if <%= color('--frameworks', BOLD) %> is
|
40
|
+
specified, this command can add a list of system frameworks to the project (e.g.,
|
41
|
+
AdSupport, CoreSpotlight, SafariServices).
|
42
|
+
|
43
|
+
A language-specific patch is applied to the AppDelegate (Swift or Objective-C).
|
44
|
+
This can be suppressed using <%= color('--no_patch_source', BOLD) %>.
|
45
|
+
|
46
|
+
<%= color('Prerequisites', BOLD) %>
|
47
|
+
|
48
|
+
Before using this command, make sure to set up your app in the Branch Dashboard
|
49
|
+
(https://dashboard.branch.io). See https://docs.branch.io/pages/dashboard/integrate/
|
50
|
+
for details. To use the <%= color('setup', BOLD) %> command, you need:
|
51
|
+
|
52
|
+
- Branch key(s), either live, test or both
|
53
|
+
- Domain name(s) used for Branch links
|
54
|
+
- Location of your Xcode project (may be inferred in simple projects)
|
55
|
+
|
56
|
+
To use the <%= color('--commit', BOLD) %> option, you must have the <%= color('git', BOLD) %> command available in your path.
|
57
|
+
|
58
|
+
To add the SDK with CocoaPods or Carthage, you must have the <%= color('pod', BOLD) %> or <%= color('carthage', BOLD) %>
|
59
|
+
command, respectively, available in your path.
|
60
|
+
|
61
|
+
All parameters are optional. A live key or test key, or both is required, as well
|
62
|
+
as at least one domain. Specify <%= color('--live_key', BOLD) %>, <%= color('--test_key', BOLD) %> or both and <%= color('--app_link_subdomain', BOLD) %>,
|
63
|
+
<%= color('--domains', BOLD) %> or both. If these are not specified, this command will prompt you
|
64
|
+
for this information.
|
65
|
+
|
66
|
+
See https://github.com/BranchMetrics/branch_io_cli#setup-command for more information.
|
67
|
+
EOF
|
16
68
|
|
17
69
|
# Required Branch params
|
18
70
|
c.option "--live_key key_live_xxxx", String, "Branch live key"
|
@@ -40,7 +92,22 @@ module BranchIOCLI
|
|
40
92
|
|
41
93
|
command :validate do |c|
|
42
94
|
c.syntax = "branch_io validate [OPTIONS]"
|
43
|
-
c.
|
95
|
+
c.summary = "Validates all Universal Link domains configured in a project"
|
96
|
+
c.description = <<EOF
|
97
|
+
This command validates all Universal Link domains configured in a project without making any modification.
|
98
|
+
It validates both Branch and non-Branch domains. Unlike web-based Universal Link validators,
|
99
|
+
this command operates directly on the project. It finds the bundle and
|
100
|
+
signing team identifiers in the project as well as the app's Associated Domains.
|
101
|
+
It requests the apple-app-site-association file for each domain and validates
|
102
|
+
the file against the project's settings.
|
103
|
+
|
104
|
+
All parameters are optional. If <%= color('--domains', BOLD) %> is specified, the list of Universal Link domains in the
|
105
|
+
Associated Domains entitlement must exactly match this list, without regard to order. If no <%= color('--domains', BOLD) %>
|
106
|
+
are provided, validation passes if at least one Universal Link domain is configured and passes validation,
|
107
|
+
and no Universal Link domain is present that does not pass validation.
|
108
|
+
|
109
|
+
See https://github.com/BranchMetrics/branch_io_cli#validate-command for more information.
|
110
|
+
EOF
|
44
111
|
|
45
112
|
c.option "--xcodeproj MyProject.xcodeproj", String, "Path to an Xcode project to update"
|
46
113
|
c.option "--target MyAppTarget", String, "Name of a target to modify in the Xcode project"
|