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 android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ android {

dependencies {
implementation("org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version")
implementation("io.didomi.sdk:android:2.44.0")
implementation("io.didomi.sdk:android:2.45.0")
implementation("androidx.multidex:multidex:2.0.1")
implementation("com.google.code.gson:gson:2.13.2")
}
2 changes: 2 additions & 0 deletions android/src/main/kotlin/io/didomi/fluttersdk/DidomiPlugin.kt
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,8 @@ class DidomiPlugin : FlutterPlugin, MethodCallHandler, ActivityAware {
countryCode = jsonDidomiInitializeParameters["countryCode"] as? String,
regionCode = jsonDidomiInitializeParameters["regionCode"] as? String,
isUnderage = jsonDidomiInitializeParameters["isUnderage"] as Boolean,
sdkPath = jsonDidomiInitializeParameters["sdkPath"] as? String,
apiPath = jsonDidomiInitializeParameters["apiPath"] as? String,
)

Didomi.getInstance().initialize(it.application, didomiInitializeParameters)
Expand Down
2 changes: 1 addition & 1 deletion ios/didomi_sdk.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Pod::Spec.new do |s|
s.source_files = 'didomi_sdk/Sources/**/*.{swift,h,m}'
s.public_header_files = 'didomi_sdk/Sources/DidomiObjC/include/**/*.h'
s.dependency 'Flutter'
s.dependency 'Didomi-XCFramework', '2.44.0'
s.dependency 'Didomi-XCFramework', '2.45.0'
s.platform = :ios, '13.0'

# Flutter.framework does not contain a i386 slice.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,9 @@ import Didomi
noticeID: jsonDidomiInitializeParameters["noticeId"] as? String,
countryCode: jsonDidomiInitializeParameters["countryCode"] as? String,
regionCode: jsonDidomiInitializeParameters["regionCode"] as? String,
isUnderage: jsonDidomiInitializeParameters["isUnderage"] as! Bool
isUnderage: jsonDidomiInitializeParameters["isUnderage"] as! Bool,
sdkPath: jsonDidomiInitializeParameters["sdkPath"] as? String,
apiPath: jsonDidomiInitializeParameters["apiPath"] as? String
)
Didomi.shared.initialize(parameters)
result(nil)
Expand Down
14 changes: 13 additions & 1 deletion lib/parameters/didomi_initialize_parameters.dart
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,14 @@ class DidomiInitializeParameters {
/// If set to true, the SDK will only display the underage notice (false by default).
bool isUnderage = false;

/// 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.
String? sdkPath;

/// 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.
String? apiPath;

DidomiInitializeParameters(
{required this.apiKey,
this.localConfigurationPath,
Expand All @@ -59,7 +67,9 @@ class DidomiInitializeParameters {
this.androidTvEnabled = false,
this.countryCode,
this.regionCode,
this.isUnderage = false});
this.isUnderage = false,
this.sdkPath,
this.apiPath});

Map<String, dynamic> toJson() => {
'apiKey': apiKey,
Expand All @@ -74,5 +84,7 @@ class DidomiInitializeParameters {
'countryCode': countryCode,
'regionCode': regionCode,
'isUnderage': isUnderage,
'sdkPath': sdkPath,
'apiPath': apiPath,
};
}
Loading