Skip to content
This repository was archived by the owner on Jan 31, 2023. It is now read-only.

Commit 824fff8

Browse files
committed
Update README for initial release
1 parent 12a52e0 commit 824fff8

File tree

1 file changed

+25
-136
lines changed

1 file changed

+25
-136
lines changed

README.md

Lines changed: 25 additions & 136 deletions
Original file line numberDiff line numberDiff line change
@@ -1,96 +1,28 @@
11
# branch plugin
22

33
[![fastlane Plugin Badge](https://rawcdn.githack.com/fastlane/fastlane/master/fastlane/assets/plugin-badge.svg?style=flat-square)](https://rubygems.org/gems/fastlane-plugin-branch)
4+
[![Gem](https://img.shields.io/gem/v/fastlane-plugin-branch.svg?style=flat)](https://rubygems.org/gems/fastlane-plugin-branch)
5+
[![Downloads](https://img.shields.io/gem/dt/fastlane-plugin-branch.svg?style=flat)](https://rubygems.org/gems/fastlane-plugin-branch)
46
[![License](https://img.shields.io/badge/license-MIT-green.svg?style=flat)](https://github.com/jdee/settings-bundle/blob/master/LICENSE)
57
[![CircleCI](https://img.shields.io/circleci/project/github/BranchMetrics/fastlane-plugin-branch.svg)](https://circleci.com/gh/BranchMetrics/fastlane-plugin-branch)
68

7-
## Getting Started
8-
9-
This project is a [_fastlane_](https://github.com/fastlane/fastlane) plugin. To get started with `fastlane-plugin-branch`
10-
before it is released:
11-
12-
### Install Fastlane
13-
14-
https://docs.fastlane.tools/getting-started/android/setup/
15-
https://docs.fastlane.tools/getting-started/ios/setup/
16-
17-
Before release, the packaged `fastlane` binary available in the zip and via Homebrew will not
18-
work.
19-
20-
```bash
21-
gem install fastlane -NV
22-
```
9+
## Preliminary release
2310

24-
**Note:** If using the system Ruby, you must use `sudo`. However, using the system Ruby is not recommended. See
25-
[Notes on Ruby Version Managers](#notes-on-ruby-version-managers)
11+
This is a preliminary release of this plugin. Please report any problems by opening issues in this repo.
2612

27-
### Set up Fastlane for your project
28-
29-
**Option 1:** This may be easiest, but it requires more setup than is needed to try out this plugin.
30-
31-
```bash
32-
fastlane init
33-
```
34-
35-
**Option 2:** This is also easy and requires no further setup:
36-
37-
```bash
38-
git checkout git@github.com:BranchMetrics/fastlane-plugin-branch
39-
cp -r fastlane-plugin-branch/fastlane /path/to/MyProject
40-
cp fastlane-plugin-branch/Branchfile /path/to/MyProject
41-
```
42-
43-
Then modify the parameters in `/path/to/MyProject/Branchfile`.
44-
45-
### Install this plugin
13+
## Getting Started
4614

47-
Once released, you can install this plugin using
15+
This project is a [_fastlane_](https://github.com/fastlane/fastlane) plugin. To get started with `fastlane-plugin-branch`, add it to your project by running:
4816

4917
```bash
5018
fastlane add_plugin branch
5119
```
5220

53-
That tries to install from Rubygems and will fail before release.
54-
55-
To install before release:
56-
57-
1. Add a `Gemfile` to your project with these contents (already there if you used fastlane init):
58-
59-
```ruby
60-
source 'https://rubygems.org'
61-
62-
gem "fastlane"
63-
64-
plugins_path = File.join(File.dirname(__FILE__), 'fastlane', 'Pluginfile')
65-
eval_gemfile(plugins_path) if File.exist?(plugins_path)
66-
```
67-
68-
2. Modify `/path/to/MyProject/fastlane/Pluginfile` to have these contents:
69-
70-
```ruby
71-
gem "fastlane-plugin-branch", git: "git@github.com/BranchMetrics/fastlane-plugin-branch"
72-
```
73-
74-
or
75-
76-
```ruby
77-
gem "fastlane-plugin-branch", path: "/where/I/checked/out/fastlane-plugin-branch"
78-
```
79-
80-
3. Install the plugin
81-
82-
```ruby
83-
bundle install
84-
```
85-
86-
**Note:** Before release, `fastlane` must always be run using `bundle exec fastlane <args>` in order
87-
to use this plugin.
88-
8921
## setup_branch action
9022

9123
### Prerequisites
9224

93-
Before using this action, you should set your app up in the [Branch Dashboard](https://dashboard.branch.io). See https://dev.branch.io/basic-setup/ for details. To use the `setup_branch` action, you need:
25+
Before using this action, make sure to set up your app in the [Branch Dashboard](https://dashboard.branch.io). See https://dev.branch.io/basic-setup/ for details. To use the `setup_branch` action, you need:
9426

9527
- Branch key(s), either live, test or both
9628
- Domain name(s) used for Branch links
@@ -103,19 +35,23 @@ This action automatically configures Xcode and Android projects that use the Bra
10335
for Universal Links, App Links and custom URI handling. It modifies Xcode project settings and entitlements as well as Info.plist and AndroidManifest.xml files.
10436

10537
```ruby
106-
setup_branch live_key: "key_live_xxxx",
107-
test_key: "key_test_yyyy",
108-
app_link_subdomain: "myapp",
109-
uri_scheme: "myscheme", # Android only
110-
android_project_path: "MyAndroidApp", # MyAndroidApp/src/main/AndroidManifest.xml
111-
xcodeproj: "MyIOSApp.xcodeproj"
38+
setup_branch(
39+
live_key: "key_live_xxxx",
40+
test_key: "key_test_yyyy",
41+
app_link_subdomain: "myapp",
42+
uri_scheme: "myscheme", # Android only
43+
android_project_path: "MyAndroidApp", # MyAndroidApp/src/main/AndroidManifest.xml
44+
xcodeproj: "MyIOSApp.xcodeproj"
45+
)
11246
```
11347

11448
Use the `:domains` parameter to specify custom domains, including non-Branch domains
11549
```ruby
116-
setup_branch live_key: "key_live_xxxx",
117-
domains: %w{example.com www.example.com}
118-
xcodeproj: "MyIOSApp.xcodeproj"
50+
setup_branch(
51+
live_key: "key_live_xxxx",
52+
domains: %w{example.com www.example.com}
53+
xcodeproj: "MyIOSApp.xcodeproj"
54+
)
11955
```
12056

12157
Available options:
@@ -157,15 +93,15 @@ validate_universal_links
15793
```
15894

15995
```ruby
160-
validate_universal_links xcodeproj: "MyProject.xcodeproj"
96+
validate_universal_links(xcodeproj: "MyProject.xcodeproj")
16197
```
16298

16399
```ruby
164-
validate_universal_links xcodeproj: "MyProject.xcodeproj", target: "MyProject"
100+
validate_universal_links(xcodeproj: "MyProject.xcodeproj", target: "MyProject")
165101
```
166102

167103
```ruby
168-
validate_universal_links domains: %w{example.com www.example.com}
104+
validate_universal_links(domains: %w{example.com www.example.com})
169105
```
170106

171107
Available options:
@@ -185,6 +121,8 @@ one Universal Link domain configured for the target, and all Universal Link doma
185121
AASA validation. If the the :domains parameter is provided, the Universal Link domains in
186122
the project must also match the value of this parameter without regard to order.
187123

124+
This action does not use the Branchfile.
125+
188126
## Example
189127

190128
Check out the [example `Fastfile`](fastlane/Fastfile) to see how to use this plugin. To try it:
@@ -225,52 +163,3 @@ For more information about how the `fastlane` plugin system works, check out the
225163
## About _fastlane_
226164

227165
_fastlane_ is the easiest way to automate beta deployments and releases for your iOS and Android apps. To learn more, check out [fastlane.tools](https://fastlane.tools).
228-
229-
## Notes on Ruby Version Managers
230-
231-
The Ruby environment is notoriously troublesome. It is strongly recommended for
232-
all Ruby work to use a version manager, either [RVM](https://rvm.io) or
233-
[rbenv](https://github.com/rbenv/rbenv). A number of Fastlane actions have known
234-
issues using the system Ruby because of SSL cert problems. This action mainly
235-
modifies project files, so it is unlikely to have too much trouble with the
236-
system Ruby. However, similar issues could arise with Universal Link validation.
237-
238-
Starting with 1.7.0, nokogiri requires Ruby 2.1. Apple ships 2.0, which is no
239-
longer a supported Ruby version as of February 2016. This is a strong argument
240-
in favor of using RVM or rbenv to get a current ruby (e.g. 2.4.1).
241-
242-
If you're using the system Ruby, you'll need to add this line to the Gemfile in
243-
your app project:
244-
245-
```Ruby
246-
gem 'nokogiri', '1.6.8.1'
247-
```
248-
249-
You may also have to install this manually first using:
250-
251-
```bash
252-
sudo gem install nokogiri -v 1.6.8.1
253-
```
254-
255-
### Streamlined RVM installation
256-
257-
```bash
258-
\curl -sSL https://get.rvm.io | bash --ruby
259-
```
260-
261-
Note the initial backslash, recommended to avoid shell aliases, but not entirely necessary.
262-
263-
Note that if GPG is detected, RVM will require a cert be installed in order to verify. On OS X:
264-
265-
```bash
266-
gpg2 --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
267-
```
268-
269-
```bash
270-
gem install bundler
271-
```
272-
273-
**Note:** When using RVM, all gems and binaries are installed under `~/.rvm`. Do not use `sudo`
274-
to install or update gems or rubies.
275-
276-
Now the `bundle` command is available in your `PATH` under `~/.rvm`.

0 commit comments

Comments
 (0)