Skip to content

Commit

Permalink
Merge pull request #306 from BranchMetrics/fix-ios-development-team
Browse files Browse the repository at this point in the history
Fix ios development team
  • Loading branch information
ethanneff authored Mar 28, 2017
2 parents 6a55696 + 2ec1e80 commit 69822ee
Show file tree
Hide file tree
Showing 9 changed files with 39 additions and 10 deletions.
6 changes: 6 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,12 @@
./src/scripts/npm/updateNativeSdk.sh -a 2.5.9 -i 0.13.5
```
- **[optional]** Update `CHANGELOG.md`
```sh
npm run changelog
```
## Test
- Validate all features on both `iOS` and `Android` on `device` only (no `simulator` or `TestFlight`)
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
<a href="https://www.npmjs.com/package/branch-cordova-sdk"><img src="https://img.shields.io/npm/l/branch-cordova-sdk.svg" alt="npm version"></a>
</p>

> Hyperlinks can navigate to your website, but not to your app. Branch fixes this.
> Hyperlinks can navigate to your website, but not to your app. Branch fixes this with deep links.
> Branch deep links will grow your app by allowing users to install, open, and navigate to content inside your app.
> Branch will grow your app by allowing users to install, open, and navigate to content inside your app.
> Increase discovery of your app based on the content inside, convert web users to app users, enable user-to-user sharing, personalize user experiences, track users, track referrals, track campaigns, track conversions, and increase overall engagement.
> Increase discovery of your app by sharing its content, converting web users to app users, enabling user-to-user sharing, personalizing user experiences, tracking users, tracking referrals, tracking campaigns, tracking conversions, and increasing overall engagement.
<p align="center">
<a href="https://youtu.be/MXgLQ8QDXk8"><img src="http://i.imgur.com/NF2NEDn.gif"/></a>
Expand Down
4 changes: 2 additions & 2 deletions 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.11",
"version": "2.5.12",
"homepage": "https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking",
"repository": {
"type": "git",
Expand Down Expand Up @@ -60,4 +60,4 @@
"validate-commit-msg": "^2.11.2",
"xml2js": "^0.4.17"
}
}
}
3 changes: 2 additions & 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.11">
version="2.5.12">

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

Expand All @@ -48,6 +48,7 @@ SOFTWARE.

<!-- Hooks -->
<hook src="src/scripts/hooks/beforePluginInstall.js" type="before_plugin_install" />
<hook src="src/scripts/hooks/beforePrepare.js" type="before_prepare" />
<hook src="src/scripts/hooks/afterPrepare.js" type="after_prepare" />

<!-- JavaScript -->
Expand Down
3 changes: 2 additions & 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.11">
version="2.5.12">

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

Expand All @@ -48,6 +48,7 @@ SOFTWARE.

<!-- Hooks -->
<hook src="src/scripts/hooks/beforePluginInstall.js" type="before_plugin_install" />
<hook src="src/scripts/hooks/beforePrepare.js" type="before_prepare" />
<hook src="src/scripts/hooks/afterPrepare.js" type="after_prepare" />

<!-- JavaScript -->
Expand Down
2 changes: 0 additions & 2 deletions src/scripts/hooks/afterPrepare.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
var iosPlist = require('../ios/updatePlist.js')
var iosCapabilities = require('../ios/enableEntitlements.js')
var iosAssociatedDomains = require('../ios/updateAssociatedDomains.js')
var iosDevelopmentTeam = require('../ios/updateDevelopmentTeam.js')
var androidManifest = require('../android/updateAndroidManifest.js')
var IOS = 'ios'
var ANDROID = 'android'
Expand All @@ -26,7 +25,6 @@
iosPlist.addBranchSettings(preferences)
iosCapabilities.enableAssociatedDomains(preferences)
iosAssociatedDomains.addAssociatedDomains(preferences)
iosDevelopmentTeam.addDevelopmentTeam(preferences)
}
})
}
Expand Down
22 changes: 22 additions & 0 deletions src/scripts/hooks/beforePrepare.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
(function () {
// properties
'use strict'
var configPreferences = require('../npm/processConfigXml.js')
var iosDevelopmentTeam = require('../ios/updateDevelopmentTeam.js')
var IOS = 'ios'

// entry
module.exports = run

// after prepare hooks based on platform
function run (context) {
var preferences = configPreferences.read(context)
var platforms = context.opts.platforms

platforms.forEach(function (platform) {
if (platform === IOS) {
iosDevelopmentTeam.addDevelopmentTeam(preferences)
}
})
}
})()
2 changes: 1 addition & 1 deletion src/scripts/npm/updateNpmVersion.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
}

function saveContent (file, content) {
return isFileXml(file) ? fileHelper.writeFile(file, content) : fileHelper.writeFile(file, JSON.stringify(content, null, 2))
return isFileXml(file) ? fileHelper.writeFile(file, content) : fileHelper.writeFile(file, JSON.stringify(content, null, 2) + '\n')
}

function isFileXml (file) {
Expand Down
1 change: 1 addition & 0 deletions testbed/init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ main() {
rm -rf ../.installed
rm -rf ./plugins
rm -rf ./platforms
rm -rf ./build.json

# build (platforms added before plugin because before_plugin_install does not work on file reference)
if [[ "$run_ios" == "true" ]]; then
Expand Down

0 comments on commit 69822ee

Please sign in to comment.