Skip to content

Commit 69822ee

Browse files
authored
Merge pull request #306 from BranchMetrics/fix-ios-development-team
Fix ios development team
2 parents 6a55696 + 2ec1e80 commit 69822ee

File tree

9 files changed

+39
-10
lines changed

9 files changed

+39
-10
lines changed

CONTRIBUTING.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,12 @@
5858
./src/scripts/npm/updateNativeSdk.sh -a 2.5.9 -i 0.13.5
5959
```
6060

61+
- **[optional]** Update `CHANGELOG.md`
62+
63+
```sh
64+
npm run changelog
65+
```
66+
6167
## Test
6268

6369
- Validate all features on both `iOS` and `Android` on `device` only (no `simulator` or `TestFlight`)

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@
88
<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>
99
</p>
1010

11-
> Hyperlinks can navigate to your website, but not to your app. Branch fixes this.
11+
> Hyperlinks can navigate to your website, but not to your app. Branch fixes this with deep links.
1212
13-
> Branch deep links will grow your app by allowing users to install, open, and navigate to content inside your app.
13+
> Branch will grow your app by allowing users to install, open, and navigate to content inside your app.
1414
15-
> 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.
15+
> 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.
1616
1717
<p align="center">
1818
<a href="https://youtu.be/MXgLQ8QDXk8"><img src="http://i.imgur.com/NF2NEDn.gif"/></a>

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "branch-cordova-sdk",
33
"description": "Branch Metrics Cordova SDK",
44
"main": "www/branch.js",
5-
"version": "2.5.11",
5+
"version": "2.5.12",
66
"homepage": "https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking",
77
"repository": {
88
"type": "git",
@@ -60,4 +60,4 @@
6060
"validate-commit-msg": "^2.11.2",
6161
"xml2js": "^0.4.17"
6262
}
63-
}
63+
}

plugin.template.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ SOFTWARE.
2424
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
2525
xmlns:android="http://schemas.android.com/apk/res/android"
2626
id="branch-cordova-sdk"
27-
version="2.5.11">
27+
version="2.5.12">
2828

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

@@ -48,6 +48,7 @@ SOFTWARE.
4848

4949
<!-- Hooks -->
5050
<hook src="src/scripts/hooks/beforePluginInstall.js" type="before_plugin_install" />
51+
<hook src="src/scripts/hooks/beforePrepare.js" type="before_prepare" />
5152
<hook src="src/scripts/hooks/afterPrepare.js" type="after_prepare" />
5253

5354
<!-- JavaScript -->

plugin.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ SOFTWARE.
2424
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
2525
xmlns:android="http://schemas.android.com/apk/res/android"
2626
id="branch-cordova-sdk"
27-
version="2.5.11">
27+
version="2.5.12">
2828

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

@@ -48,6 +48,7 @@ SOFTWARE.
4848

4949
<!-- Hooks -->
5050
<hook src="src/scripts/hooks/beforePluginInstall.js" type="before_plugin_install" />
51+
<hook src="src/scripts/hooks/beforePrepare.js" type="before_prepare" />
5152
<hook src="src/scripts/hooks/afterPrepare.js" type="after_prepare" />
5253

5354
<!-- JavaScript -->

src/scripts/hooks/afterPrepare.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
var iosPlist = require('../ios/updatePlist.js')
66
var iosCapabilities = require('../ios/enableEntitlements.js')
77
var iosAssociatedDomains = require('../ios/updateAssociatedDomains.js')
8-
var iosDevelopmentTeam = require('../ios/updateDevelopmentTeam.js')
98
var androidManifest = require('../android/updateAndroidManifest.js')
109
var IOS = 'ios'
1110
var ANDROID = 'android'
@@ -26,7 +25,6 @@
2625
iosPlist.addBranchSettings(preferences)
2726
iosCapabilities.enableAssociatedDomains(preferences)
2827
iosAssociatedDomains.addAssociatedDomains(preferences)
29-
iosDevelopmentTeam.addDevelopmentTeam(preferences)
3028
}
3129
})
3230
}

src/scripts/hooks/beforePrepare.js

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
(function () {
2+
// properties
3+
'use strict'
4+
var configPreferences = require('../npm/processConfigXml.js')
5+
var iosDevelopmentTeam = require('../ios/updateDevelopmentTeam.js')
6+
var IOS = 'ios'
7+
8+
// entry
9+
module.exports = run
10+
11+
// after prepare hooks based on platform
12+
function run (context) {
13+
var preferences = configPreferences.read(context)
14+
var platforms = context.opts.platforms
15+
16+
platforms.forEach(function (platform) {
17+
if (platform === IOS) {
18+
iosDevelopmentTeam.addDevelopmentTeam(preferences)
19+
}
20+
})
21+
}
22+
})()

src/scripts/npm/updateNpmVersion.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
}
3737

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

4242
function isFileXml (file) {

testbed/init.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ main() {
6464
rm -rf ../.installed
6565
rm -rf ./plugins
6666
rm -rf ./platforms
67+
rm -rf ./build.json
6768

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

0 commit comments

Comments
 (0)