diff --git a/ReactNativeCmp.podspec b/ReactNativeCmp.podspec index b034e6c..830416e 100644 --- a/ReactNativeCmp.podspec +++ b/ReactNativeCmp.podspec @@ -15,7 +15,7 @@ Pod::Spec.new do |s| s.platforms = { :ios => min_ios_version_supported } s.source = { :git => "https://github.com/SourcePointUSA/react-native-sourcepoint-cmp.git", :tag => "#{s.version}" } - s.dependency "ConsentViewController", "7.11.0" + s.dependency "ConsentViewController", "7.11.1" s.source_files = "ios/**/*.{h,m,mm,cpp,swift}" s.private_header_files = "ios/**/*.h" diff --git a/android/build.gradle b/android/build.gradle index 3808e19..7cc89e1 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -77,7 +77,7 @@ dependencies { implementation "org.jetbrains.kotlinx:kotlinx-serialization-json:1.7.3" implementation "org.jetbrains.kotlinx:kotlinx-datetime:0.6.1" - implementation "com.sourcepoint.cmplibrary:cmplibrary:7.15.1" + implementation "com.sourcepoint.cmplibrary:cmplibrary:7.15.2" } react { diff --git a/android/src/main/java/com/sourcepoint/reactnativecmp/ReactNativeCmpModule.kt b/android/src/main/java/com/sourcepoint/reactnativecmp/ReactNativeCmpModule.kt index 011ea4e..4418bda 100644 --- a/android/src/main/java/com/sourcepoint/reactnativecmp/ReactNativeCmpModule.kt +++ b/android/src/main/java/com/sourcepoint/reactnativecmp/ReactNativeCmpModule.kt @@ -114,6 +114,10 @@ class ReactNativeCmpModule(reactContext: ReactApplicationContext) : NativeReactN runOnMainThread { spConsentLib?.loadPrivacyManager(id, PREFERENCES) } } + override fun dismissMessage() { + runOnMainThread { spConsentLib?.dismissMessage() } + } + companion object { const val NAME = "ReactNativeCmp" } diff --git a/example/ios/Podfile.lock b/example/ios/Podfile.lock index a30c598..89f0084 100644 --- a/example/ios/Podfile.lock +++ b/example/ios/Podfile.lock @@ -1,8 +1,8 @@ PODS: - boost (1.84.0) - - ConsentViewController (7.11.0): + - ConsentViewController (7.11.1): - Down (~> 0.11.0) - - SPMobileCore (= 0.1.10) + - SPMobileCore (= 0.1.11) - DoubleConversion (1.1.6) - fast_float (6.1.4) - FBLazyVector (0.79.2) @@ -1660,7 +1660,7 @@ PODS: - React-perflogger (= 0.79.2) - React-utils (= 0.79.2) - ReactNativeCmp (1.0.3): - - ConsentViewController (= 7.11.0) + - ConsentViewController (= 7.11.1) - DoubleConversion - glog - hermes-engine @@ -1685,7 +1685,7 @@ PODS: - ReactCommon/turbomodule/core - Yoga - SocketRocket (0.7.1) - - SPMobileCore (0.1.10) + - SPMobileCore (0.1.11) - Yoga (0.0.0) DEPENDENCIES: @@ -1919,7 +1919,7 @@ EXTERNAL SOURCES: SPEC CHECKSUMS: boost: 7e761d76ca2ce687f7cc98e698152abd03a18f90 - ConsentViewController: 1548d9e77c75b5be5136200be406f0f3b9ae173c + ConsentViewController: 6cd17ebf78b80e7d32bf3d6b0b46d20a40e8cad9 DoubleConversion: cb417026b2400c8f53ae97020b2be961b59470cb fast_float: 06eeec4fe712a76acc9376682e4808b05ce978b6 FBLazyVector: 84b955f7b4da8b895faf5946f73748267347c975 @@ -1989,9 +1989,9 @@ SPEC CHECKSUMS: ReactAppDependencyProvider: 04d5eb15eb46be6720e17a4a7fa92940a776e584 ReactCodegen: c63eda03ba1d94353fb97b031fc84f75a0d125ba ReactCommon: 76d2dc87136d0a667678668b86f0fca0c16fdeb0 - ReactNativeCmp: 8dbececd6ce4493712d1d86c2bccbf6eac8f6a2a + ReactNativeCmp: a5bbbb82931dfb31a31f42f941063bcd24104069 SocketRocket: d4aabe649be1e368d1318fdf28a022d714d65748 - SPMobileCore: 50aecf97a8fa8134bb84aaed4349a3a20a7e22b2 + SPMobileCore: 220d109e404cb17169f7e26f2a34c6022b80079a Yoga: c758bfb934100bb4bf9cbaccb52557cee35e8bdf PODFILE CHECKSUM: decdc7519d77aa5eae65b167fa59bcfce25e15d2 diff --git a/ios/RNSourcepointCmp.swift b/ios/RNSourcepointCmp.swift index 40d22a4..f762939 100644 --- a/ios/RNSourcepointCmp.swift +++ b/ios/RNSourcepointCmp.swift @@ -116,8 +116,11 @@ import React print("Something went wrong", error) delegate?.onError(description: error.description) } -} + public func dismissMessage() { + consentManager?.dismissMessage() + } +} private class CMPDelegateHandler: NSObject, SPDelegate { weak var parent: ReactNativeCmpImpl? diff --git a/ios/ReactNativeCmp.mm b/ios/ReactNativeCmp.mm index 188d3e5..825942e 100644 --- a/ios/ReactNativeCmp.mm +++ b/ios/ReactNativeCmp.mm @@ -98,6 +98,10 @@ - (void)loadPreferenceCenter:(nonnull NSString *)id { [sdk loadPreferenceCenter: id]; } +- (void)dismissMessage { + [sdk dismissMessage]; +} + // MARK: SPDelegate - (void)onAction:(RNAction*)action { [self emitOnAction: [action toDictionary]]; diff --git a/src/NativeReactNativeCmp.ts b/src/NativeReactNativeCmp.ts index 7c32690..10327d7 100644 --- a/src/NativeReactNativeCmp.ts +++ b/src/NativeReactNativeCmp.ts @@ -154,6 +154,7 @@ export interface Spec extends TurboModule { loadUSNatPrivacyManager(pmId: string): void; loadGlobalCmpPrivacyManager(pmId: string): void; loadPreferenceCenter(id: string): void; + dismissMessage(): void; readonly onAction: EventEmitter; readonly onSPUIReady: EventEmitter; diff --git a/src/index.tsx b/src/index.tsx index 06d2694..3b00d1c 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -48,6 +48,10 @@ export default class SPConsentManager implements Spec { ReactNativeCmp.loadPreferenceCenter(id); } + dismissMessage(): void { + ReactNativeCmp.dismissMessage(); + } + onAction: EventEmitter = ReactNativeCmp.onAction; onSPUIReady: EventEmitter = ReactNativeCmp.onSPUIReady; onSPUIFinished: EventEmitter = ReactNativeCmp.onSPUIFinished;