diff --git a/android/build.gradle b/android/build.gradle index 07d397ab..a93ebfa2 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -158,5 +158,5 @@ dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" implementation("com.google.code.gson:gson:2.13.1") - implementation "io.didomi.sdk:android:2.44.0" + implementation "io.didomi.sdk:android:2.45.0" } diff --git a/android/src/main/java/io/didomi/reactnative/DidomiModule.kt b/android/src/main/java/io/didomi/reactnative/DidomiModule.kt index 5941c53a..a0eed0ea 100644 --- a/android/src/main/java/io/didomi/reactnative/DidomiModule.kt +++ b/android/src/main/java/io/didomi/reactnative/DidomiModule.kt @@ -1268,7 +1268,9 @@ class DidomiModule(reactContext: ReactApplicationContext) : DidomiModuleSpec(rea androidTvEnabled = (jsonObject.opt("androidTvEnabled") as? Boolean) ?: false, countryCode = jsonObject.opt("countryCode")?.toString(), regionCode = jsonObject.opt("regionCode")?.toString(), - isUnderage = (jsonObject.opt("isUnderage") as? Boolean) ?: false + isUnderage = (jsonObject.opt("isUnderage") as? Boolean) ?: false, + sdkPath = jsonObject.opt("sdkPath")?.toString(), + apiPath = jsonObject.opt("apiPath")?.toString() ) } diff --git a/ios/RNDidomi.swift b/ios/RNDidomi.swift index d7ea98dd..364d8ed4 100644 --- a/ios/RNDidomi.swift +++ b/ios/RNDidomi.swift @@ -948,7 +948,7 @@ extension RNDidomi { didomiEventListener.onIntegrationError = { [weak self] event in let result = [ "integrationName": event.integrationName, - "reson": event.reason + "reason": event.reason ] self?.dispatchEvent(withName: "on_integration_error", body: result) } @@ -980,7 +980,9 @@ extension RNDidomi { noticeID: json["noticeId"] as? String, countryCode: json["countryCode"] as? String, regionCode: json["regionCode"] as? String, - isUnderage: json["isUnderage"] as? Bool ?? false + isUnderage: json["isUnderage"] as? Bool ?? false, + sdkPath: json["sdkPath"] as? String, + apiPath: json["apiPath"] as? String ) } diff --git a/react-native-didomi.podspec b/react-native-didomi.podspec index 00bdcad6..76d7a62f 100644 --- a/react-native-didomi.podspec +++ b/react-native-didomi.podspec @@ -15,7 +15,7 @@ Pod::Spec.new do |s| s.source_files = "ios/**/*.{h,m,mm,swift}" - s.dependency "Didomi-XCFramework", "2.44.0" + s.dependency "Didomi-XCFramework", "2.45.0" install_modules_dependencies(s) end diff --git a/src/DidomiTypes.ts b/src/DidomiTypes.ts index 484ba14b..12cfd383 100644 --- a/src/DidomiTypes.ts +++ b/src/DidomiTypes.ts @@ -279,6 +279,18 @@ export interface DidomiInitializeParameters { * @property */ isUnderage?: boolean; + /** + * Base URL used to load all static files (didomi_config.json, GVL, IAB vendor list). + * Defaults to the Didomi SDK CDN if not set. Must use HTTPS. + * @property + */ + sdkPath?: string; + /** + * Base URL used for all API requests (Consents API, cross-device sync, API Events). + * Defaults to the Didomi API if not set. Must use HTTPS. + * @property + */ + apiPath?: string; } /** diff --git a/test/src/App.tsx b/test/src/App.tsx index 61f54116..57ffb74b 100644 --- a/test/src/App.tsx +++ b/test/src/App.tsx @@ -14,7 +14,7 @@ import InitializeMethods from './InitializeMethods'; import ErrorBoundary from './ErrorBoundary'; function App() { - const MAX_EVENTS_DISPLAYED = 3; + const MAX_EVENTS_DISPLAYED = 6; const [receivedEvents, setReceivedEvents] = useState([]);