Skip to content

Commit

Permalink
Allow the debug flag to be passed through for #14
Browse files Browse the repository at this point in the history
  • Loading branch information
John Saleigh committed Oct 29, 2015
1 parent f5bc421 commit 6272436
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions cordova-src/android/BranchDevice.java
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,9 @@ private void getInstallData(JSONArray args, CallbackContext callbackContext) {
JSONObject installPost = new JSONObject();
try {
boolean debug = args.optBoolean(0);
Log.d("BranchDevice", "GetInstallData debug value is " + debug);
Log.d("BranchDevice", "getInstallData debug value is " + debug);
int isReferrable = args.optInt(1, -1);
Log.d("BranchDevice", "GetInstallData isReferrable value is " + isReferrable);
Log.d("BranchDevice", "getInstallData isReferrable value is " + isReferrable);
String idStr = getUniqueID(debug);
if (!idStr.equals(BLANK)) {
installPost.put("hardware_id", idStr);
Expand Down Expand Up @@ -138,7 +138,7 @@ private void getOpenData(JSONArray args, CallbackContext callbackContext) {
JSONObject openPost = new JSONObject();
try {
int isReferrable = args.optInt(0, -1);
Log.d("BranchDevice", "GetInstallData isReferrable value is " + isReferrable);
Log.d("BranchDevice", "getOpenData isReferrable value is " + isReferrable);
if (isReferrable < 0) {
openPost.put("is_referrable", 0);
} else {
Expand Down
2 changes: 1 addition & 1 deletion cordova-src/ios/BNCDevice.m
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ - (NSDictionary*)parseURLParams:(NSString *)query {

- (void)getInstallData:(CDVInvokedUrlCommand *)command {
BOOL debug = [[command argumentAtIndex:0 withDefault:[NSNumber numberWithBool:NO]] boolValue];
int isReferrable = [[command argumentAtIndex:0 withDefault:[NSNumber numberWithInt:-1]] intValue];
int isReferrable = [[command argumentAtIndex:1 withDefault:[NSNumber numberWithInt:-1]] intValue];

NSMutableDictionary *post = [[NSMutableDictionary alloc] init];
BOOL isRealHardwareId;
Expand Down

0 comments on commit 6272436

Please sign in to comment.