File tree Expand file tree Collapse file tree 4 files changed +7
-7
lines changed
android/src/main/java/io/branch/rnbranch Expand file tree Collapse file tree 4 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -446,13 +446,13 @@ public void setIdentity(String identity) {
446446 }
447447
448448 @ ReactMethod
449- public void setIdentityWithPromise (String identity , Promise promise ) {
449+ public void setIdentityAsync (String identity , Promise promise ) {
450450 Branch branch = Branch .getInstance ();
451451 branch .setIdentity (identity , new BranchReferralInitListener () {
452452 @ Override
453453 public void onInitFinished (JSONObject referringParams , BranchError error ) {
454454 if (error != null ) {
455- promise .reject ("RNBranch::Error::setIdentityWithPromise failed" , error .getMessage ());
455+ promise .reject ("RNBranch::Error::setIdentityAsync failed" , error .getMessage ());
456456 } else {
457457 promise .resolve (convertJsonToMap (referringParams ));
458458 }
Original file line number Diff line number Diff line change @@ -407,17 +407,17 @@ - (BranchUniversalObject *)findUniversalObjectWithIdent:(NSString *)ident reject
407407 [self .class.branch setIdentity: identity];
408408}
409409
410- #pragma mark setIdentityWithPromise
410+ #pragma mark setIdentityAsync
411411RCT_EXPORT_METHOD (
412- setIdentityWithPromise :(NSString *)identity
412+ setIdentityAsync :(NSString *)identity
413413 resolver:(RCTPromiseResolveBlock)resolve
414414 rejecter:(__unused RCTPromiseRejectBlock)reject
415415 ) {
416416 [self .class.branch setIdentity: identity withCallback: ^(NSDictionary *params, NSError *error) {
417417 if (!error) {
418418 resolve (params);
419419 } else {
420- reject (@" RNBranch::Error::setIdentityWithPromise failed" , error.localizedDescription , error);
420+ reject (@" RNBranch::Error::setIdentityAsync failed" , error.localizedDescription , error);
421421 }
422422 }];
423423}
Original file line number Diff line number Diff line change @@ -310,7 +310,7 @@ interface Branch {
310310 getFirstReferringParams : ( ) => Promise < BranchParams > ;
311311 lastAttributedTouchData : ( attributionWindow ?: number ) => Promise < BranchParams > ;
312312 setIdentity : ( identity : string ) => void ;
313- setIdentityWithPromise : ( identity : string ) => Promise < BranchParams > ;
313+ setIdentityAsync : ( identity : string ) => Promise < BranchParams > ;
314314 setRequestMetadata : ( key : string , value : string ) => void ;
315315 addFacebookPartnerParameter : ( name : string , value : string ) => void ;
316316 clearPartnerParameter : ( ) => void ;
Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ class Branch {
6262 getFirstReferringParams = RNBranch . getFirstReferringParams
6363 lastAttributedTouchData = ( attributionWindow = { } ) => RNBranch . lastAttributedTouchData ( attributionWindow )
6464 setIdentity = ( identity ) => RNBranch . setIdentity ( identity )
65- setIdentityWithPromise = ( identity ) => RNBranch . setIdentityWithPromise ( identity )
65+ setIdentityAsync = ( identity ) => RNBranch . setIdentityAsync ( identity )
6666 setRequestMetadata = ( key , value ) => {
6767 console . info ( '[Branch] setRequestMetadata has limitations when called from JS. Some network calls are made prior to the JS layer being available, those calls will not have the metadata.' )
6868 return RNBranch . setRequestMetadataKey ( key , value )
You can’t perform that action at this time.
0 commit comments