Skip to content

Commit

Permalink
Merge pull request #298 from BranchMetrics/native-sdk-install-script
Browse files Browse the repository at this point in the history
Native sdk install script
  • Loading branch information
ethanneff authored Mar 8, 2017
2 parents a3b2143 + eaf5b5c commit be3bc5f
Show file tree
Hide file tree
Showing 36 changed files with 149 additions and 2,152 deletions.
64 changes: 14 additions & 50 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Developing the SDK Locally

*Questions? [Contact us](https://support.branch.io/support/tickets/new)*

1. [Dependencies](#dependencies)
Expand All @@ -25,13 +26,13 @@ export PATH="/usr/local/bin:$PATH";
```sh
brew install node;
```
```

> Gulp
```sh
npm install -g gulp-cli;
```
```

### SDK

Expand All @@ -46,73 +47,36 @@ npm install --save-dev;

### Develop

> Build
> Changes to `/src` don't need a `init.sh` rebuild, just a `cordova run ios`
```sh
gulp prerelease;
```

> **[optional]** Update [iOS SDK](https://github.com/BranchMetrics/ios-branch-deep-linking/tags) (will need to update `plugin.xml` dependencies if new iOS files)
> **[optional]** Update [Android](https://github.com/BranchMetrics/android-branch-deep-linking/releases) and [iOS](https://github.com/BranchMetrics/ios-branch-deep-linking/releases) SDKs
```sh
./src/scripts/npm/updateIosSdk.sh 0.13.5;
./src/scripts/npm/updateAndroidSdk.sh 2.5.9;
./src/scripts/npm/updateNativeSdk.sh -a 2.5.9 -i 0.13.5
```

### Test

> Modify `BRANCH_KEY` and `URI_SCHEME` and `config.xml` to values in [Branch Dashboard](https://dashboard.branch.io/settings/link)
```sh
gulp prerelease; cd testbed; npm install -g cordova; cordova platform remove ios; cordova platform remove android; cordova platform remove browser; cordova platform add ios; cordova platform add android; cordova plugin remove branch-cordova-sdk; cordova plugin add ../ --variable BRANCH_KEY=key_live_icCccJIpd7GlYY5oOmoEtpafuDiuyXhT --variable URI_SCHEME=enefftest;

gulp prod;
cd testbed;
npm uninstall mkpath node-version-compare plist xml2js;
rm -rf ../.installed;
rm -rf ./plugins;
rm -rf ./platforms;
cordova platform add ios;
cordova plugin add ../;
cordova build ios --developmentTeam="PW4Q8885U7";
open -a Xcode platforms/ios/Branch\ Testing.xcworkspace;

```

> Validate all features on both `iOS` and `Android` on `device` only (no `simulator` or `TestFlight`)
> ios
```sh
cordova build ios --developmentTeam="PW4Q8885U7"; open -a Xcode platforms/ios/Branch\ Testing.xcworkspace;
./testbed/init -idc
```

> android
```sh
cordova build android; cordova run android;
chrome://inspect/#devices
./testbed/init -adc
```

> Test harnesses `TODO`
### Submit

> **Required** [Semantic Release](https://github.com/semantic-release/semantic-release) comments `feat`, `fix`, `docs`, `style`, `refactor`, `perf`, `test`, `chore`, `revert`
> **Required** [Semantic Release](https://github.com/semantic-release/semantic-release) comments `feat`, `fix`, `docs`, `style`, `refactor`, `perf`, `test`, `chore`, `revert`. Versioning handled automatically based on commit messages.
> Submit code with a [pull request](https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking)
```sh
git checkout -b BRANCH_NAME;
git add FILE_NAME;
npm run commit;
git push origin BRANCH_NAME;
```
### Publish

> Update `CHANGELOG.md`
> Update version within plugin.template.xml
> Run `gulp prerelease`
> Merge Pull Request - code to NPM will happen automatically

## Hooks

Don't need to `rebuild.sh`, just re-run `cordova build ios`
> Code review from a Branch member. Merge will automatically add SDK to NPM.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
The MIT License (MIT)
MIT License

Copyright (c) 2015 Branch Metrics, Inc.

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "branch-cordova-sdk",
"description": "Branch Metrics Cordova SDK",
"main": "www/branch.js",
"version": "2.5.7",
"version": "2.5.8",
"homepage": "https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion plugin.template.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ SOFTWARE.
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
xmlns:android="http://schemas.android.com/apk/res/android"
id="branch-cordova-sdk"
version="2.5.7">
version="2.5.8">

<!-- DO NOT EDIT THIS FILE. MAKE ALL CHANGES TO plugin.template.xml INSTEAD -->

Expand Down
2 changes: 1 addition & 1 deletion plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ SOFTWARE.
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
xmlns:android="http://schemas.android.com/apk/res/android"
id="branch-cordova-sdk"
version="2.5.7">
version="2.5.8">

<!-- DO NOT EDIT THIS FILE. MAKE ALL CHANGES TO plugin.template.xml INSTEAD -->

Expand Down
1 change: 0 additions & 1 deletion src/ios/dependencies/Branch.framework/Branch

This file was deleted.

1 change: 0 additions & 1 deletion src/ios/dependencies/Branch.framework/Headers

This file was deleted.

42 changes: 0 additions & 42 deletions src/ios/dependencies/Branch.framework/Info.plist

This file was deleted.

This file was deleted.

Binary file not shown.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit be3bc5f

Please sign in to comment.