Skip to content

Commit

Permalink
Merge pull request #349 from BranchMetrics/event-commerce
Browse files Browse the repository at this point in the history
fix: updating dependencies
  • Loading branch information
ethanneff authored Aug 2, 2017
2 parents 21b9caa + 1fca206 commit 53b4685
Show file tree
Hide file tree
Showing 44 changed files with 1,392 additions and 549 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,5 @@ local.properties
out/
npm-debug.log*
*.map
yarn.lock
package-lock.json
yarn-error.log
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
7 changes: 4 additions & 3 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": "src/branch.js",
"version": "2.6.5",
"version": "2.6.6",
"homepage": "https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking",
"repository": {
"type": "git",
Expand Down Expand Up @@ -41,6 +41,7 @@
"precommit": "npm-check --skip-unused && gulp prod",
"postcommit": "semantic-release pre --verifyRelease='./src/scripts/npm/updateNpmVersion' || true",
"prerelease": "gulp prod",
"dependencies": "npm-check -u",
"semantic-release": "semantic-release pre && npm publish && semantic-release post"
},
"dependencies": {
Expand All @@ -57,10 +58,10 @@
"husky": "^0.14.3",
"mkpath": "^1.0.0",
"node-version-compare": "^1.0.1",
"npm-check": "^5.4.4",
"npm-check": "^5.4.5",
"plist": "^2.1.0",
"semantic-release": "^6.3.6",
"validate-commit-msg": "^2.12.2",
"validate-commit-msg": "^2.14.0",
"xml2js": "^0.4.17"
}
}
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.6.5">
version="2.6.6">

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

Expand Down
4 changes: 3 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.6.5">
version="2.6.6">

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

Expand Down Expand Up @@ -101,6 +101,8 @@ SOFTWARE.
<source-file src="src/ios/dependencies/Branch-SDK/BNCContentDiscoveryManager.m" />
<header-file src="src/ios/dependencies/Branch-SDK/BNCDebug.h" />
<source-file src="src/ios/dependencies/Branch-SDK/BNCDebug.m" />
<header-file src="src/ios/dependencies/Branch-SDK/BNCDeepLinkViewControllerInstance.h" />
<source-file src="src/ios/dependencies/Branch-SDK/BNCDeepLinkViewControllerInstance.m" />
<header-file src="src/ios/dependencies/Branch-SDK/BNCDeviceInfo.h" />
<source-file src="src/ios/dependencies/Branch-SDK/BNCDeviceInfo.m" />
<header-file src="src/ios/dependencies/Branch-SDK/BNCEncodingUtils.h" />
Expand Down
Binary file not shown.
30 changes: 15 additions & 15 deletions src/android/io/branch/BranchSDK.java
Original file line number Diff line number Diff line change
Expand Up @@ -91,76 +91,76 @@ public boolean execute(String action, JSONArray args, CallbackContext callbackCo

if (action.equals("setDebug")) {
if (args.length() == 1) {
cordova.getThreadPool().execute(r);
cordova.getActivity().runOnUiThread(r);
}
return true;
} else if (action.equals("initSession")) {
cordova.getThreadPool().execute(r);
cordova.getActivity().runOnUiThread(r);
return true;
} else if (action.equals("setMixpanelToken")) {
cordova.getThreadPool().execute(r);
cordova.getActivity().runOnUiThread(r);
return true;
} else {
if (this.instance != null) {
if (action.equals("setIdentity")) {
cordova.getThreadPool().execute(r);
cordova.getActivity().runOnUiThread(r);
return true;
} else if (action.equals("userCompletedAction")) {
if (args.length() < 1 && args.length() > 2) {
callbackContext.error(String.format("Parameter mismatched. 1-2 is required but %d is given", args.length()));
return false;
}
cordova.getThreadPool().execute(r);
cordova.getActivity().runOnUiThread(r);
return true;
} else if (action.equals("sendCommerceEvent")) {
if (args.length() < 1 && args.length() > 2) {
callbackContext.error(String.format("Parameter mismatched. 1-2 is required but %d is given", args.length()));
return false;
}
cordova.getThreadPool().execute(r);
cordova.getActivity().runOnUiThread(r);
return true;
} else if (action.equals("getFirstReferringParams")) {
cordova.getThreadPool().execute(r);
cordova.getActivity().runOnUiThread(r);
return true;
} else if (action.equals("getLatestReferringParams")) {
cordova.getThreadPool().execute(r);
cordova.getActivity().runOnUiThread(r);
return true;
} else if (action.equals("logout")) {
cordova.getThreadPool().execute(r);
cordova.getActivity().runOnUiThread(r);
return true;
} else if (action.equals("loadRewards")) {
cordova.getThreadPool().execute(r);
cordova.getActivity().runOnUiThread(r);
return true;
} else if (action.equals("redeemRewards")) {
if (args.length() < 1 && args.length() > 2) {
callbackContext.error(String.format("Parameter mismatched. 1-2 is required but %d is given", args.length()));
return false;
}
cordova.getThreadPool().execute(r);
cordova.getActivity().runOnUiThread(r);
return true;
} else if (action.equals("getCreditHistory")) {
cordova.getThreadPool().execute(r);
cordova.getActivity().runOnUiThread(r);
return true;
} else if (action.equals("createBranchUniversalObject")) {
if (args.length() != 1) {
callbackContext.error(String.format("Parameter mismatched. 1 is required but %d is given", args.length()));
return false;
}
cordova.getThreadPool().execute(r);
cordova.getActivity().runOnUiThread(r);
return true;
} else if (action.equals(("generateShortUrl"))) {
if (args.length() != 3) {
callbackContext.error(String.format("Parameter mismatched. 3 is required but %d is given", args.length()));
return false;
}
cordova.getThreadPool().execute(r);
cordova.getActivity().runOnUiThread(r);
return true;
} else if (action.equals("registerView")) {
if (args.length() != 1) {
callbackContext.error(String.format("Parameter mismatched. 1 is required but %d is given", args.length()));
return false;
}
cordova.getThreadPool().execute(r);
cordova.getActivity().runOnUiThread(r);
return true;
} else if (action.equals("showShareSheet")) {
if (args.length() < 3) {
Expand Down
199 changes: 198 additions & 1 deletion src/ios/dependencies/Branch-SDK/BNCCommerceEvent.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,203 @@ extern BNCProductCategory BNCProductCategorySportingGoods;
extern BNCProductCategory BNCProductCategoryToysGames;
extern BNCProductCategory BNCProductCategoryVehiclesParts;

#pragma mark - BNCCurrency

typedef NSString*const BNCCurrency;

extern BNCCurrency BNCCurrencyAED;
extern BNCCurrency BNCCurrencyAFN;
extern BNCCurrency BNCCurrencyALL;
extern BNCCurrency BNCCurrencyAMD;
extern BNCCurrency BNCCurrencyANG;
extern BNCCurrency BNCCurrencyAOA;
extern BNCCurrency BNCCurrencyARS;
extern BNCCurrency BNCCurrencyAUD;
extern BNCCurrency BNCCurrencyAWG;
extern BNCCurrency BNCCurrencyAZN;
extern BNCCurrency BNCCurrencyBAM;
extern BNCCurrency BNCCurrencyBBD;

extern BNCCurrency BNCCurrencyBDT;
extern BNCCurrency BNCCurrencyBGN;
extern BNCCurrency BNCCurrencyBHD;
extern BNCCurrency BNCCurrencyBIF;
extern BNCCurrency BNCCurrencyBMD;
extern BNCCurrency BNCCurrencyBND;
extern BNCCurrency BNCCurrencyBOB;
extern BNCCurrency BNCCurrencyBOV;
extern BNCCurrency BNCCurrencyBRL;
extern BNCCurrency BNCCurrencyBSD;
extern BNCCurrency BNCCurrencyBTN;
extern BNCCurrency BNCCurrencyBWP;

extern BNCCurrency BNCCurrencyBYN;
extern BNCCurrency BNCCurrencyBYR;
extern BNCCurrency BNCCurrencyBZD;
extern BNCCurrency BNCCurrencyCAD;
extern BNCCurrency BNCCurrencyCDF;
extern BNCCurrency BNCCurrencyCHE;
extern BNCCurrency BNCCurrencyCHF;
extern BNCCurrency BNCCurrencyCHW;
extern BNCCurrency BNCCurrencyCLF;
extern BNCCurrency BNCCurrencyCLP;
extern BNCCurrency BNCCurrencyCNY;
extern BNCCurrency BNCCurrencyCOP;

extern BNCCurrency BNCCurrencyCOU;
extern BNCCurrency BNCCurrencyCRC;
extern BNCCurrency BNCCurrencyCUC;
extern BNCCurrency BNCCurrencyCUP;
extern BNCCurrency BNCCurrencyCVE;
extern BNCCurrency BNCCurrencyCZK;
extern BNCCurrency BNCCurrencyDJF;
extern BNCCurrency BNCCurrencyDKK;
extern BNCCurrency BNCCurrencyDOP;
extern BNCCurrency BNCCurrencyDZD;
extern BNCCurrency BNCCurrencyEGP;
extern BNCCurrency BNCCurrencyERN;

extern BNCCurrency BNCCurrencyETB;
extern BNCCurrency BNCCurrencyEUR;
extern BNCCurrency BNCCurrencyFJD;
extern BNCCurrency BNCCurrencyFKP;
extern BNCCurrency BNCCurrencyGBP;
extern BNCCurrency BNCCurrencyGEL;
extern BNCCurrency BNCCurrencyGHS;
extern BNCCurrency BNCCurrencyGIP;
extern BNCCurrency BNCCurrencyGMD;
extern BNCCurrency BNCCurrencyGNF;
extern BNCCurrency BNCCurrencyGTQ;
extern BNCCurrency BNCCurrencyGYD;

extern BNCCurrency BNCCurrencyHKD;
extern BNCCurrency BNCCurrencyHNL;
extern BNCCurrency BNCCurrencyHRK;
extern BNCCurrency BNCCurrencyHTG;
extern BNCCurrency BNCCurrencyHUF;
extern BNCCurrency BNCCurrencyIDR;
extern BNCCurrency BNCCurrencyILS;
extern BNCCurrency BNCCurrencyINR;
extern BNCCurrency BNCCurrencyIQD;
extern BNCCurrency BNCCurrencyIRR;
extern BNCCurrency BNCCurrencyISK;
extern BNCCurrency BNCCurrencyJMD;

extern BNCCurrency BNCCurrencyJOD;
extern BNCCurrency BNCCurrencyJPY;
extern BNCCurrency BNCCurrencyKES;
extern BNCCurrency BNCCurrencyKGS;
extern BNCCurrency BNCCurrencyKHR;
extern BNCCurrency BNCCurrencyKMF;
extern BNCCurrency BNCCurrencyKPW;
extern BNCCurrency BNCCurrencyKRW;
extern BNCCurrency BNCCurrencyKWD;
extern BNCCurrency BNCCurrencyKYD;
extern BNCCurrency BNCCurrencyKZT;
extern BNCCurrency BNCCurrencyLAK;

extern BNCCurrency BNCCurrencyLBP;
extern BNCCurrency BNCCurrencyLKR;
extern BNCCurrency BNCCurrencyLRD;
extern BNCCurrency BNCCurrencyLSL;
extern BNCCurrency BNCCurrencyLYD;
extern BNCCurrency BNCCurrencyMAD;
extern BNCCurrency BNCCurrencyMDL;
extern BNCCurrency BNCCurrencyMGA;
extern BNCCurrency BNCCurrencyMKD;
extern BNCCurrency BNCCurrencyMMK;
extern BNCCurrency BNCCurrencyMNT;
extern BNCCurrency BNCCurrencyMOP;

extern BNCCurrency BNCCurrencyMRO;
extern BNCCurrency BNCCurrencyMUR;
extern BNCCurrency BNCCurrencyMVR;
extern BNCCurrency BNCCurrencyMWK;
extern BNCCurrency BNCCurrencyMXN;
extern BNCCurrency BNCCurrencyMXV;
extern BNCCurrency BNCCurrencyMYR;
extern BNCCurrency BNCCurrencyMZN;
extern BNCCurrency BNCCurrencyNAD;
extern BNCCurrency BNCCurrencyNGN;
extern BNCCurrency BNCCurrencyNIO;
extern BNCCurrency BNCCurrencyNOK;

extern BNCCurrency BNCCurrencyNPR;
extern BNCCurrency BNCCurrencyNZD;
extern BNCCurrency BNCCurrencyOMR;
extern BNCCurrency BNCCurrencyPAB;
extern BNCCurrency BNCCurrencyPEN;
extern BNCCurrency BNCCurrencyPGK;
extern BNCCurrency BNCCurrencyPHP;
extern BNCCurrency BNCCurrencyPKR;
extern BNCCurrency BNCCurrencyPLN;
extern BNCCurrency BNCCurrencyPYG;
extern BNCCurrency BNCCurrencyQAR;
extern BNCCurrency BNCCurrencyRON;

extern BNCCurrency BNCCurrencyRSD;
extern BNCCurrency BNCCurrencyRUB;
extern BNCCurrency BNCCurrencyRWF;
extern BNCCurrency BNCCurrencySAR;
extern BNCCurrency BNCCurrencySBD;
extern BNCCurrency BNCCurrencySCR;
extern BNCCurrency BNCCurrencySDG;
extern BNCCurrency BNCCurrencySEK;
extern BNCCurrency BNCCurrencySGD;
extern BNCCurrency BNCCurrencySHP;
extern BNCCurrency BNCCurrencySLL;
extern BNCCurrency BNCCurrencySOS;

extern BNCCurrency BNCCurrencySRD;
extern BNCCurrency BNCCurrencySSP;
extern BNCCurrency BNCCurrencySTD;
extern BNCCurrency BNCCurrencySYP;
extern BNCCurrency BNCCurrencySZL;
extern BNCCurrency BNCCurrencyTHB;
extern BNCCurrency BNCCurrencyTJS;
extern BNCCurrency BNCCurrencyTMT;
extern BNCCurrency BNCCurrencyTND;
extern BNCCurrency BNCCurrencyTOP;
extern BNCCurrency BNCCurrencyTRY;
extern BNCCurrency BNCCurrencyTTD;

extern BNCCurrency BNCCurrencyTWD;
extern BNCCurrency BNCCurrencyTZS;
extern BNCCurrency BNCCurrencyUAH;
extern BNCCurrency BNCCurrencyUGX;
extern BNCCurrency BNCCurrencyUSD;
extern BNCCurrency BNCCurrencyUSN;
extern BNCCurrency BNCCurrencyUYI;
extern BNCCurrency BNCCurrencyUYU;
extern BNCCurrency BNCCurrencyUZS;
extern BNCCurrency BNCCurrencyVEF;
extern BNCCurrency BNCCurrencyVND;
extern BNCCurrency BNCCurrencyVUV;

extern BNCCurrency BNCCurrencyWST;
extern BNCCurrency BNCCurrencyXAF;
extern BNCCurrency BNCCurrencyXAG;
extern BNCCurrency BNCCurrencyXAU;
extern BNCCurrency BNCCurrencyXBA;
extern BNCCurrency BNCCurrencyXBB;
extern BNCCurrency BNCCurrencyXBC;
extern BNCCurrency BNCCurrencyXBD;
extern BNCCurrency BNCCurrencyXCD;
extern BNCCurrency BNCCurrencyXDR;
extern BNCCurrency BNCCurrencyXFU;
extern BNCCurrency BNCCurrencyXOF;

extern BNCCurrency BNCCurrencyXPD;
extern BNCCurrency BNCCurrencyXPF;
extern BNCCurrency BNCCurrencyXPT;
extern BNCCurrency BNCCurrencyXSU;
extern BNCCurrency BNCCurrencyXTS;
extern BNCCurrency BNCCurrencyXUA;
extern BNCCurrency BNCCurrencyXXX;
extern BNCCurrency BNCCurrencyYER;
extern BNCCurrency BNCCurrencyZAR;
extern BNCCurrency BNCCurrencyZMW;

#pragma mark - BNCProduct

@interface BNCProduct : NSObject
Expand All @@ -53,7 +250,7 @@ extern BNCProductCategory BNCProductCategoryVehiclesParts;

@interface BNCCommerceEvent : NSObject
@property (nonatomic, strong) NSDecimalNumber *revenue;
@property (nonatomic, strong) NSString *currency;
@property (nonatomic, strong) BNCCurrency currency;
@property (nonatomic, strong) NSString *transactionID;
@property (nonatomic, strong) NSDecimalNumber *shipping;
@property (nonatomic, strong) NSDecimalNumber *tax;
Expand Down
Loading

0 comments on commit 53b4685

Please sign in to comment.