AdswizzSDK

@objc(AASDKAdswizzSDK)
public class AdswizzSDK : NSObject

AdswizzSDK main entry point. Use the shared instance to set the AdswizzSDKDelegate or initialize the SDK.

  • The AdswizzSDK object.

    Declaration

    Swift

    @objc
    public static let shared: AdswizzSDK
  • Optional delegate for interactive module status.

    Declaration

    Swift

    @objc
    public weak var delegate: AdswizzSDKDelegate?
  • Watch session.

    Declaration

    Swift

    @objc
    public var watchSession: WatchSession { get }
  • Background download completion handler sent to your application delegate. Used for downloading podcasts when your app is suspended.

    Declaration

    Swift

    @objc
    public var backgroundSessionCompletionHandler: (() -> Void)? { get set }
  • Google’s PAL manager implementation.

    Declaration

    Swift

    @objc
    public weak var palManager: PALManagerProtocol? { get set }
  • OMID Partner name used by AdswizzSDK.

    Declaration

    Swift

    @objc
    public var omidPartner: String { get }
  • OMID Partner version used by AdswizzSDK.

    Declaration

    Swift

    @objc
    public var omidPartnerVersion: String { get }
  • OMID version used by AdswizzSDK.

    Declaration

    Swift

    @objc
    public var omidVersion: String { get }
  • Internal identifier used by AdswizzSDK. Read-only.

    Declaration

    Swift

    @objc
    public var xpaid: String? { get }
  • Version for theAdswizzSDK. Read-only.

    Declaration

    Swift

    @objc
    public var sdkVersion: String { get }
  • Access and set the supported privacy consent options

    Declaration

    Swift

    @objc
    public var consent: AdswizzPrivacyConsent { get }
  • Access and set the supported location options

    Declaration

    Swift

    @objc
    public var location: AdswizzLocationConfig { get }
  • Initialize AdswizzSDK.

    Throws

    throws if you are missing information in Info.pList or the configuration is nil.

    Declaration

    Swift

    @objc
    public func initialize(with configuration: AdswizzSDKConfig? = nil, completion: AdswizzSDKInitCompletion? = nil) throws
  • initialize(with:) Asynchronous

    Initialize AdswizzSDK in an async context. Use the variant with a completion handler instead if your implementation does not provide an async context.

    Throws

    an error if you are missing information in Info.plist and the configuration is nil.

    Declaration

    Swift

    @objc
    public func initialize(with configuration: AdswizzSDKConfig? = nil) async throws
  • Unitialize AdswizzSDK.

    Declaration

    Swift

    @objc
    public func uninitialize()
  • Set the ad companion options.

    Declaration

    Swift

    @objc
    public static func setAdCompanionOptions(_ options: AdCompanionOptions)

    Parameters

    options

    update the ad companion options

  • Set the GDPR consent.

    Declaration

    Swift

    @available(*, deprecated, renamed: "consent.gdpr", message: "Please use the GDPR consent with the new privacy consent API")
    @objc
    public var gdprConsent: GDPRConsent { get set }
  • Set the U.S. privacy consent config for the SDK.

    Declaration

    Swift

    @available(*, deprecated, renamed: "consent.ccpa", message: "Please use the CCPA config consent with the new privacy consent API")
    @objc
    public var ccpaConfig: AdswizzCCPAConfig { get set }
  • Set the GPP privacy consent for the SDK.

    Declaration

    Swift

    @available(*, deprecated, renamed: "consent.gpp", message: "Please use the GPP consent with the new privacy consent API")
    @objc
    public var gppConsent: String? { get set }
  • Set the location accuracy.

    Declaration

    Swift

    @available(*, deprecated, renamed: "location.accuracy", message: "Please use the accuracy property with the new location API")
    @objc
    public var locationAccuracy: CLLocationAccuracy { get set }
  • Enable/disable location significant changes mode.

    Declaration

    Swift

    @available(*, deprecated, renamed: "location.enableSignificantChanges", message: "Please use the enableSignificantChanges property with the new location API")
    @objc
    public var enableLocationSignificantChanges: Bool { get set }
  • Add an AnalyticsConnector to AdswizzSDK to log events to the connector.

    Declaration

    Swift

    @objc
    public func add(connector: AnalyticsConnector)

    Parameters

    connector

    the connector to add

  • Remove an AnalyticsConnector from AdswizzSDK to stop logging events to the connector.

    Declaration

    Swift

    @objc
    public func remove(connector: AnalyticsConnector)

    Parameters

    connector

    the connector to remove

  • Get the current permission status in the SDK.

    Declaration

    Swift

    @objc
    public func permissionStatus(for type: AdswizzPermissionType) -> Bool

    Parameters

    type

    permissionType as described in AdswizzSDKPrivacyData framework

    Return Value

    whether or not AdswizzSDK can use the API guarded by this permission

  • Set if the SDK can use the data exposed by this permission.

    • location: the SDK will not continue to process CLLocationManager updates
    • locationAdvanced: the same as location. You can set whichever you prefer.
    • photo: the SDK will not save any photos as a result of an interactive ad with the “download photo” action
    • microphone: the SDK will not start recording the user during an interactive voice ad. If this is set, interactive voice ads will not be played.
    • speech: the SDK will not begin using the speech transcriber during an interactive voice ad. If this is set, interactive voice ads will not be played.
    • calendar: the SDK will not insert any events in the user’s calendar during an interactive ad with the “add to calendar” action.
    • camera: For future use. Currently, the SDK doesn’t use any data from the camera.
    • contacts: For future use. Currently, the SDK doesn’t access the contacts.
    • idfa: Since iOS 14, the app needs to request permission from the user to track. If set to false, the SDK will not use the IDFA from the system.
    • motionActivity: the SDK will not use any updates from CMMotionActivityManager

    Declaration

    Swift

    @objc
    public func setPermissionStatus(for type: AdswizzPermissionType, status: Bool)

    Parameters

    type

    permissionType as described in the AdswizzSDKPrivacyData framework

    status

    if the SDK is allowed to use the permission, false if the SDK is denied Discussion: By default, the SDK will use the API unlocked by each permission, but you can limit SDK usage dynamically by setting this. The AdswizzSDK will ensure that, if the permission status is set to false, the API guarded by the permission is not used, thus giving you granular control over what sensitive data the SDK may use during its lifetime. To see what happens when you set a permission status to false, read the descriptions above.

  • Enable/disable data collection for the AdswizzSDK data collector. The default is false. Your app should get the user’s preference and then honor that input to opt-in or opt-out by instructing the AdswizzSDK to collect data or not. Ideally, you should sync the data collection consent with the GDPR/CCPA consent. e.g: if the user has declined its GDPR consent, you should also set disableDataCollection to true.

    Declaration

    Swift

    @objc
    public var disableDataCollection: Bool { get set }
  • Enable/disable RAD (Remote Audio Data) for AdswizzSDK when playing podcasts. The default is false. Your app should get the user’s preference and then honor that input to opt-in or opt-out by instructing AdswizzSDK to collect data or not. Ideally, you should sync data collection consent with the GDPR/CCPA consent. e.g: if the user has declined its GDPR consent, you should also set disableRAD to true.

    Declaration

    Swift

    @objc
    public var disableRAD: Bool { get set }
  • Undocumented

    Declaration

    Swift

    @objc
    public func triggerShake()
  • Undocumented

    Declaration

    Swift

    @objc
    public func triggerSpeech(transcript: [String])