File tree Expand file tree Collapse file tree 11 files changed +95
-14
lines changed
src/main/java/co/boundstate Expand file tree Collapse file tree 11 files changed +95
-14
lines changed Original file line number Diff line number Diff line change 11Branch Capacitor SDK change log
22
3+ - 8.4.0
4+
5+ - Exposed new method ` setConsumerProtectionAttributionLevel ` to set CPP level
6+ - Branch Android SDK bumped to 5.15.1
7+ - Branch iOS SDK bumped to 3.9.0
8+ - Updated @capacitor/ios to 6.2.0
9+
310- 8.3.0
411
512 - Branch Android SDK bumped to 5.13.0
Original file line number Diff line number Diff line change @@ -66,7 +66,7 @@ dependencies {
6666 implementation project(' :capacitor-android' )
6767 implementation ' androidx.annotation:annotation:1.4.0'
6868 implementation ' androidx.appcompat:appcompat:1.5.0'
69- api ' io.branch.sdk.android:library:5.13.0 '
69+ api ' io.branch.sdk.android:library:5.15.1 '
7070 testImplementation " junit:junit:$junitVersion "
7171 androidTestImplementation " androidx.test.ext:junit:$androidxJunitVersion "
7272 androidTestImplementation " androidx.test.espresso:espresso-core:$androidxEspressoCoreVersion "
Original file line number Diff line number Diff line change 1818import io .branch .referral .BranchError ;
1919import io .branch .referral .BranchShareSheetBuilder ;
2020import io .branch .referral .BranchShortLinkBuilder ;
21+ import io .branch .referral .Defines ;
2122import io .branch .referral .QRCode .BranchQRCode ;
2223import io .branch .referral .SharingHelper ;
2324import io .branch .referral .util .BRANCH_STANDARD_EVENT ;
@@ -549,4 +550,35 @@ public void setDMAParamsForEEA(PluginCall call) {
549550
550551 call .resolve ();
551552 }
553+
554+ @ PluginMethod
555+ public void setConsumerProtectionAttributionLevel (PluginCall call ) {
556+ String level = call .getString ("level" );
557+ if (level == null ) {
558+ call .reject ("Must provide a valid attribution level" );
559+ return ;
560+ }
561+
562+ Defines .BranchAttributionLevel attributionLevel ;
563+ switch (level ) {
564+ case "FULL" :
565+ attributionLevel = Defines .BranchAttributionLevel .FULL ;
566+ break ;
567+ case "REDUCED" :
568+ attributionLevel = Defines .BranchAttributionLevel .REDUCED ;
569+ break ;
570+ case "MINIMAL" :
571+ attributionLevel = Defines .BranchAttributionLevel .MINIMAL ;
572+ break ;
573+ case "NONE" :
574+ attributionLevel = Defines .BranchAttributionLevel .NONE ;
575+ break ;
576+ default :
577+ call .reject ("Invalid attribution level provided" );
578+ return ;
579+ }
580+
581+ Branch .getInstance ().setConsumerProtectionAttributionLevel (attributionLevel );
582+ call .resolve ();
583+ }
552584}
Original file line number Diff line number Diff line change @@ -70,4 +70,24 @@ class BranchService {
7070 completion ( NSError ( domain: " Invalid URL " , code: 400 , userInfo: nil ) )
7171 }
7272 }
73+
74+ func setConsumerProtectionAttributionLevel( level: String ) -> Void {
75+ var attributionLevel : BranchAttributionLevel
76+
77+ switch level {
78+ case " FULL " :
79+ attributionLevel = BranchAttributionLevel . full
80+ case " REDUCED " :
81+ attributionLevel = BranchAttributionLevel . reduced
82+ case " MINIMAL " :
83+ attributionLevel = BranchAttributionLevel . minimal
84+ case " NONE " :
85+ attributionLevel = BranchAttributionLevel . none
86+ default :
87+ return
88+ }
89+
90+ Branch . getInstance ( ) . setConsumerProtectionAttributionLevel ( attributionLevel)
91+ }
92+
7393}
Original file line number Diff line number Diff line change 1717 CAP_PLUGIN_METHOD (getFirstReferringParams, CAPPluginReturnPromise);
1818 CAP_PLUGIN_METHOD (setDMAParamsForEEA, CAPPluginReturnPromise);
1919 CAP_PLUGIN_METHOD (handleUrl, CAPPluginReturnPromise);
20+ CAP_PLUGIN_METHOD (setConsumerProtectionAttributionLevel, CAPPluginReturnPromise);
21+
2022)
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ public class BranchDeepLinks: CAPPlugin {
1616 object: nil
1717 )
1818
19- Branch . getInstance ( ) . registerPluginName ( " Capacitor " , version: " 8.3 .0 " )
19+ Branch . getInstance ( ) . registerPluginName ( " Capacitor " , version: " 8.4 .0 " )
2020 }
2121
2222 @objc public func setBranchService( branchService: Any ) {
@@ -355,4 +355,15 @@ public class BranchDeepLinks: CAPPlugin {
355355 }
356356 }
357357 }
358+
359+ @objc func setConsumerProtectionAttributionLevel( _ call: CAPPluginCall ) {
360+ guard let level = call. getString ( " level " ) else {
361+ call. reject ( " Must provide a valid attribution level " )
362+ return
363+ }
364+
365+ branchService. setConsumerProtectionAttributionLevel ( level: level)
366+ call. resolve ( )
367+ }
368+
358369}
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ def capacitor_pods
44 use_frameworks!
55 pod 'Capacitor' , :path => '../node_modules/@capacitor/ios'
66 pod 'CapacitorCordova' , :path => '../node_modules/@capacitor/ios'
7- pod 'BranchSDK' , '~> 3.6.5 '
7+ pod 'BranchSDK' , '~> 3.9.0 '
88end
99
1010target 'Plugin' do
Original file line number Diff line number Diff line change 11PODS:
2- - BranchSDK (3.6.5 )
3- - Capacitor (6.0 .0):
2+ - BranchSDK (3.9.0 )
3+ - Capacitor (6.2 .0):
44 - CapacitorCordova
5- - CapacitorCordova (6.0 .0)
5+ - CapacitorCordova (6.2 .0)
66
77DEPENDENCIES:
8- - BranchSDK (~> 3.6.5 )
8+ - BranchSDK (~> 3.9.0 )
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: ef7d89062afb08b20f65d5b1633b215ee77ab77f
24- Capacitor: 559d073c4ca6c27f8e7002c807eea94c3ba435a9
25- CapacitorCordova: 8c4bfdf69368512e85b1d8b724dd7546abeb30af
23+ BranchSDK: caa0aad74d39bcd08573661d13ae0821feecdada
24+ Capacitor: 1f3c7b9802d958cd8c4eb63895fff85dff2e1eea
25+ CapacitorCordova: b33e7f4aa4ed105dd43283acdd940964374a87d9
2626
27- PODFILE CHECKSUM: eacb5a70bea671c5a765cb96750ba8653a52d16b
27+ PODFILE CHECKSUM: 8997a24b5d8780d5611e0cf2d1d4aa3cf1c5d2ae
2828
29- COCOAPODS: 1.15 .2
29+ COCOAPODS: 1.16 .2
Original file line number Diff line number Diff line change 11{
22 "name" : " capacitor-branch-deep-links" ,
3- "version" : " 8.3 .0" ,
3+ "version" : " 8.4 .0" ,
44 "description" : " Capacitor plugin for Branch.io deep links" ,
55 "main" : " dist/plugin.cjs.js" ,
66 "module" : " dist/esm/index.js" ,
2222 "@capacitor/android" : " ^6.0.0" ,
2323 "@capacitor/cli" : " ^6.0.0" ,
2424 "@capacitor/core" : " ^6.0.0" ,
25- "@capacitor/ios" : " ^6.0 .0" ,
25+ "@capacitor/ios" : " ^6.2 .0" ,
2626 "@ionic/prettier-config" : " ^1.0.0" ,
2727 "@ionic/swiftlint-config" : " ^1.0.0" ,
2828 "@rollup/plugin-node-resolve" : " ^8.1.0" ,
Original file line number Diff line number Diff line change @@ -85,6 +85,8 @@ export interface BranchInitEvent extends BranchReferringParamsResponse {}
8585
8686export type BranchATTAuthorizationStatus = 0 | 1 | 2 | 3 ;
8787
88+ export type BranchConsumerProtectionAttributionLevel = 'FULL' | 'REDUCED' | 'MINIMAL' | 'NONE' ;
89+
8890export interface BranchDeepLinksPlugin {
8991 addListener (
9092 eventName : 'init' ,
@@ -118,4 +120,5 @@ export interface BranchDeepLinksPlugin {
118120 getLatestReferringParams ( ) : Promise < BranchReferringParamsResponse > ;
119121 getFirstReferringParams ( ) : Promise < BranchReferringParamsResponse > ;
120122 setDMAParamsForEEA : ( options : BranchDMAParams ) => void ;
123+ setConsumerProtectionAttributionLevel ( options : { level : BranchConsumerProtectionAttributionLevel } ) : Promise < void > ;
121124}
You can’t perform that action at this time.
0 commit comments