File tree Expand file tree Collapse file tree 7 files changed +72
-20
lines changed
android/src/main/java/co/boundstate Expand file tree Collapse file tree 7 files changed +72
-20
lines changed Original file line number Diff line number Diff line change @@ -518,4 +518,18 @@ private BranchShareSheetBuilder getShareLinkBuilder(BranchShortLinkBuilder short
518518
519519 return shareLinkBuilder ;
520520 }
521+
522+ @ PluginMethod
523+ public void getLatestReferringParams (PluginCall call ) {
524+ JSObject ret = new JSObject ();
525+ ret .put ("referringParams" , Branch .getInstance ().getLatestReferringParams ());
526+ call .resolve (ret );
527+ }
528+
529+ @ PluginMethod
530+ public void getFirstReferringParams (PluginCall call ) {
531+ JSObject ret = new JSObject ();
532+ ret .put ("referringParams" , Branch .getInstance ().getFirstReferringParams ());
533+ call .resolve (ret );
534+ }
521535}
Original file line number Diff line number Diff line change @@ -43,8 +43,18 @@ class BranchService {
4343 completion ( nil , error)
4444 } else if let qrCodeData = qrCodeData {
4545 let qrCodeString = qrCodeData. base64EncodedString ( )
46- completion ( qrCodeString, nil )
46+ completion ( qrCodeString, nil )
4747 }
4848 }
4949 }
50+
51+ func getLatestReferringParams( completion: @escaping ( [ AnyHashable : Any ] ) -> ( Void ) ) -> Void {
52+ let params = Branch . getInstance ( ) . getLatestReferringParams ( ) ?? [ : ]
53+ completion ( params)
54+ }
55+
56+ func getFirstReferringParams( completion: @escaping ( [ AnyHashable : Any ] ) -> ( Void ) ) -> Void {
57+ let params = Branch . getInstance ( ) . getFirstReferringParams ( ) ?? [ : ]
58+ completion ( params)
59+ }
5060}
Original file line number Diff line number Diff line change 1313 CAP_PLUGIN_METHOD (setIdentity, CAPPluginReturnPromise);
1414 CAP_PLUGIN_METHOD (logout, CAPPluginReturnPromise);
1515 CAP_PLUGIN_METHOD (getBranchQRCode, CAPPluginReturnPromise);
16+ CAP_PLUGIN_METHOD (getLatestReferringParams, CAPPluginReturnPromise);
17+ CAP_PLUGIN_METHOD (getFirstReferringParams, CAPPluginReturnPromise);
1618)
Original file line number Diff line number Diff line change @@ -313,4 +313,20 @@ public class BranchDeepLinks: CAPPlugin {
313313 hexInt = UInt32 ( bitPattern: scanner. scanInt32 ( representation: . hexadecimal) ?? 0 )
314314 return hexInt
315315 }
316+
317+ @objc func getLatestReferringParams( _ call: CAPPluginCall ) {
318+ branchService. getLatestReferringParams ( ) { ( params) in
319+ call. resolve ( [
320+ " referringParams " : params
321+ ] )
322+ }
323+ }
324+
325+ @objc func getFirstReferringParams( _ call: CAPPluginCall ) {
326+ branchService. getFirstReferringParams ( ) { ( params) in
327+ call. resolve ( [
328+ " referringParams " : params
329+ ] )
330+ }
331+ }
316332}
Original file line number Diff line number Diff line change 11PODS:
2- - BranchSDK (2.2.0 )
3- - Capacitor (5.0.5 ):
2+ - BranchSDK (3.0.1 )
3+ - Capacitor (5.5.1 ):
44 - CapacitorCordova
5- - CapacitorCordova (5.0.5 )
5+ - CapacitorCordova (5.5.1 )
66
77DEPENDENCIES:
8- - BranchSDK (~> 2.2.0 )
8+ - BranchSDK (~> 3.0.1 )
99 - "Capacitor (from `../node_modules/@capacitor/ios`)"
1010 - "CapacitorCordova (from `../node_modules/@capacitor/ios`)"
1111
@@ -20,10 +20,10 @@ EXTERNAL SOURCES:
2020 :path: "../node_modules/@capacitor/ios"
2121
2222SPEC CHECKSUMS:
23- BranchSDK: 8749d10e30725d08b6c188ab90e6fd6223d204db
24- Capacitor: b1248915663add1bd6567e2b67c1c1fa3abcf5e8
25- CapacitorCordova: f8c06b897c74ee8f7701fe10e6443b40822bc83a
23+ BranchSDK: e268bcf41469051c9e83efcd6fd85d0ba91d1d0f
24+ Capacitor: 9da0a2415e3b6098511f8b5ffdb578d91ee79f8f
25+ CapacitorCordova: e128cc7688c070ca0bfa439898a5f609da8dbcfe
2626
27- PODFILE CHECKSUM: 8d82a5f2a904341bee78b56626ba4183204a9f0d
27+ PODFILE CHECKSUM: c730e0536dc486077a354a5b012e11d630c85889
2828
29- COCOAPODS: 1.11.3
29+ COCOAPODS: 1.12.1
Original file line number Diff line number Diff line change @@ -99,7 +99,7 @@ export interface BranchDeepLinksPlugin {
9999 metaData : { [ key : string ] : any } ;
100100 } ) : Promise < void > ;
101101 handleATTAuthorizationStatus ( options : {
102- status : BranchATTAuthorizationStatus
102+ status : BranchATTAuthorizationStatus ;
103103 } ) : Promise < void > ;
104104 disableTracking ( options : {
105105 isEnabled : false ;
@@ -108,7 +108,7 @@ export interface BranchDeepLinksPlugin {
108108 newIdentity : string ;
109109 } ) : Promise < BranchReferringParamsResponse > ;
110110 logout ( ) : Promise < BranchLoggedOutResponse > ;
111- getBranchQRCode (
112- options : BranchQRCodeParams ,
113- ) : Promise < BranchQRCodeResponse > ;
111+ getBranchQRCode ( options : BranchQRCodeParams ) : Promise < BranchQRCodeResponse > ;
112+ getLatestReferringParams ( ) : Promise < BranchReferringParamsResponse > ;
113+ getFirstReferringParams ( ) : Promise < BranchReferringParamsResponse > ;
114114}
Original file line number Diff line number Diff line change @@ -13,8 +13,10 @@ import {
1313 BranchQRCodeResponse ,
1414} from './definitions' ;
1515
16- export class BranchDeepLinksWeb extends WebPlugin
17- implements BranchDeepLinksPlugin {
16+ export class BranchDeepLinksWeb
17+ extends WebPlugin
18+ implements BranchDeepLinksPlugin
19+ {
1820 constructor ( ) {
1921 super ( {
2022 name : 'BranchDeepLinks' ,
@@ -55,9 +57,7 @@ export class BranchDeepLinksWeb extends WebPlugin
5557 ) ;
5658 }
5759
58- handleATTAuthorizationStatus ( _ : {
59- status : number
60- } ) : Promise < void > {
60+ handleATTAuthorizationStatus ( _ : { status : number } ) : Promise < void > {
6161 return Promise . reject (
6262 new Error ( 'BranchDeepLinks does not have web implementation' ) ,
6363 ) ;
@@ -88,6 +88,16 @@ export class BranchDeepLinksWeb extends WebPlugin
8888 new Error ( 'BranchDeepLinks does not have web implementation' ) ,
8989 ) ;
9090 }
91- }
9291
92+ getLatestReferringParams ( ) : Promise < BranchReferringParamsResponse > {
93+ return Promise . reject (
94+ new Error ( 'BranchDeepLinks does not have web implementation' ) ,
95+ ) ;
96+ }
9397
98+ getFirstReferringParams ( ) : Promise < BranchReferringParamsResponse > {
99+ return Promise . reject (
100+ new Error ( 'BranchDeepLinks does not have web implementation' ) ,
101+ ) ;
102+ }
103+ }
You can’t perform that action at this time.
0 commit comments