Skip to content

Commit 146974f

Browse files
committed
fix: corrected testbed init with latest cordova
1 parent 2c2b586 commit 146974f

File tree

2 files changed

+10
-18
lines changed

2 files changed

+10
-18
lines changed

testbed/config.template.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
<widget id="com.eneff.branch.cordovatestbed" version="1.0.0" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
33
<!-- Branch -->
44

5-
<!-- remove spec to switch from local to npm -->
6-
<plugin name="branch-cordova-sdk" spec="../" />
5+
<!-- uncomment line below to switch from local to npm -->
6+
<!-- <plugin name="branch-cordova-sdk" spec="^2.6.0" /> -->
77
<branch-config>
88
<branch-key value="key_live_ndqptlgXNE4LHqIahH1WIpbiyFlb62J3" />
99
<uri-scheme value="branchcordova" />

testbed/init.sh

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,6 @@ options() {
5252

5353
main() {
5454
# clean
55-
if [[ "$run_cor" == "true" ]]; then
56-
npm install -g cordova gulp-cli ios-deploy
57-
fi
58-
if [[ "$run_dep" == "true" ]]; then
59-
npm uninstall mkpath node-version-compare plist xml2js
60-
fi
6155
rm -rf ../.installed
6256
rm -rf ./node_modules
6357
rm -rf ./plugins
@@ -67,6 +61,13 @@ main() {
6761
rm -rf ./package.json
6862
rm -rf ./package-lock.json
6963

64+
if [[ "$run_cor" == "true" ]]; then
65+
npm install -g cordova gulp-cli ios-deploy
66+
fi
67+
if [[ "$run_dep" == "true" ]]; then
68+
npm uninstall mkpath node-version-compare plist xml2js
69+
fi
70+
7071
# validate
7172
gulp prod
7273

@@ -79,19 +80,10 @@ main() {
7980
fi
8081
if [[ "$run_and" == "true" ]]; then
8182
cordova platform add android
82-
# TODO: remove for cordova 6.5.0
83-
cordova platform update [email protected]
8483
fi
8584

86-
# TODO: remove this cordova error fix (https://stackoverflow.com/questions/42350505/error-cannot-read-property-replace-of-undefined-when-building-ios-cordova)
87-
# if [[ "$run_ios" == "true" ]]; then
88-
# cd ./platforms/ios/cordova/node_modules/
89-
# npm install ios-sim@latest
90-
# cd ../../../../
91-
# fi
92-
9385
# plugin
94-
# cordova plugin add ../
86+
cordova plugin add ../
9587

9688
# run
9789
if [[ "$run_ios" == "true" ]]; then

0 commit comments

Comments
 (0)