Skip to content

Advanced Settings

The Boldwin SDK provides several configuration options.

Verbose Logging

// Enable verbose logging
BoldwinSDK.shared.logLevel = .verbose

Location Sharing

Consider configuring the following properties for better ad targeting:

  • shareGeoLocation - boolean, if true, the SDK includes the user’s location data in the request. Default value is false.
  • locationUpdatesEnabled - boolean, if true, the SDK will periodically try to listen for location updates in order to request location-based ads. Default value is true.

The Boldwin SDK provides a set of properties to help publishers comply with privacy regulations.

GDPR

Indicates whether the user is subject to GDPR (General Data Protection Regulation). 0 - GDPR does not apply, 1 - GDPR applies. Persisted in User Defaults.

BoldwinSDK.shared.subjectToGDPR = 1

The IAB GDPR consent string, passed to ad requests to signal the user’s explicit consent status. Persisted in User Defaults.

BoldwinSDK.shared.gdprConsentString = "BOEFEAyOEFEAyAHABDENAI4AAAB9vABAASA"

A string representation of per-purpose consents as per IAB TCF v2.0, where each character in the string corresponds to a specific consent purpose. Persisted in User Defaults.

BoldwinSDK.shared.purposeConsents = "1100101"

COPPA

Specifies whether the current user or request is subject to COPPA (Children’s Online Privacy Protection Act) as defined by the U.S. Federal Trade Commission. Assign 0 if not subject to COPPA, 1 if subject to COPPA.

BoldwinSDK.shared.subjectToCOPPA = 1