Skip to content

Commit

Permalink
fix: updated testbed init after errors in cordova
Browse files Browse the repository at this point in the history
  • Loading branch information
ethanneff committed Aug 1, 2017
1 parent f2abfa4 commit a6391d0
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 8,438 deletions.
7 changes: 7 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

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

1. [Todo](#todo)
1. [Data Flow](#data-flow)
1. [Dependencies](#dependencies)
1. [Setup](#setup)
Expand All @@ -10,6 +11,12 @@
1. [Submit](#submit)
1. [Publish](#publish)

## TODO

- `<plugin name="branch-cordova-sdk" spec="../" />` or `cordova plugin add ../` causes an infinite loop when importing Branch on Cordova 7.0.1. Works on Cordova 6.5.0.
- need to remove `TODO` from `init.sh` for `ios-sim` error
- `cordova platform update android@6.2.2` added for Cordova 6.5.0 error on Android

## Data Flow

- [Users sets values](https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/blob/master/testbed/config.template.xml#L6-L13)
Expand Down
4 changes: 2 additions & 2 deletions testbed/config.template.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
<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">
<!-- Branch -->

<!-- uncomment the following line if building locally and not contributing -->
<!-- <plugin name="branch-cordova-sdk" /> -->
<!-- remove spec to switch from local to npm -->
<plugin name="branch-cordova-sdk" spec="../" />
<branch-config>
<branch-key value="key_live_ndqptlgXNE4LHqIahH1WIpbiyFlb62J3" />
<uri-scheme value="branchcordova" />
Expand Down
16 changes: 9 additions & 7 deletions testbed/init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -71,25 +71,27 @@ main() {
gulp prod

# config
yes | \cp -f config.template.xml config.xml
cp config.template.xml config.xml

# build (platforms added before plugin because before_plugin_install does not work on file reference)
if [[ "$run_ios" == "true" ]]; then
cordova platform add ios
fi
if [[ "$run_and" == "true" ]]; then
cordova platform add android
# TODO: remove for cordova 6.5.0
cordova platform update android@6.2.2
fi

# TODO: remove this cordova error fix (https://stackoverflow.com/questions/42350505/error-cannot-read-property-replace-of-undefined-when-building-ios-cordova)
if [[ "$run_ios" == "true" ]]; then
cd ./platforms/ios/cordova/node_modules/
npm install ios-sim@latest
cd ../../../../
fi
# if [[ "$run_ios" == "true" ]]; then
# cd ./platforms/ios/cordova/node_modules/
# npm install ios-sim@latest
# cd ../../../../
# fi

# plugin
cordova plugin add ../
# cordova plugin add ../

# run
if [[ "$run_ios" == "true" ]]; then
Expand Down
Loading

0 comments on commit a6391d0

Please sign in to comment.