Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ReactNativeCmp.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
2 changes: 1 addition & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
Expand Down
14 changes: 7 additions & 7 deletions example/ios/Podfile.lock
Original file line number Diff line number Diff line change
@@ -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)
Expand Down Expand Up @@ -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
Expand All @@ -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:
Expand Down Expand Up @@ -1919,7 +1919,7 @@ EXTERNAL SOURCES:

SPEC CHECKSUMS:
boost: 7e761d76ca2ce687f7cc98e698152abd03a18f90
ConsentViewController: 1548d9e77c75b5be5136200be406f0f3b9ae173c
ConsentViewController: 6cd17ebf78b80e7d32bf3d6b0b46d20a40e8cad9
DoubleConversion: cb417026b2400c8f53ae97020b2be961b59470cb
fast_float: 06eeec4fe712a76acc9376682e4808b05ce978b6
FBLazyVector: 84b955f7b4da8b895faf5946f73748267347c975
Expand Down Expand Up @@ -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
Expand Down
5 changes: 4 additions & 1 deletion ios/RNSourcepointCmp.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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?
Expand Down
4 changes: 4 additions & 0 deletions ios/ReactNativeCmp.mm
Original file line number Diff line number Diff line change
Expand Up @@ -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]];
Expand Down
1 change: 1 addition & 0 deletions src/NativeReactNativeCmp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<SPAction>;
readonly onSPUIReady: EventEmitter<void>;
Expand Down
4 changes: 4 additions & 0 deletions src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ export default class SPConsentManager implements Spec {
ReactNativeCmp.loadPreferenceCenter(id);
}

dismissMessage(): void {
ReactNativeCmp.dismissMessage();
}

onAction: EventEmitter<SPAction> = ReactNativeCmp.onAction;
onSPUIReady: EventEmitter<void> = ReactNativeCmp.onSPUIReady;
onSPUIFinished: EventEmitter<void> = ReactNativeCmp.onSPUIFinished;
Expand Down
Loading