PrivacyKitConfigure

public protocol PrivacyKitConfigure

Undocumented

Available where Self: PrivacyKit

  • config(_:) Default implementation

    Default Implementation

    Configure PrivacyKit with your privacy policy URL. This funciton does not include a terms of service.

    Declaration

    Swift

    func config(_ privacyPolicyLink: String)

    Parameters

    privacyPolicyLink

    Your privacy policy’s URL (e.g. https://example.com/privacy)

  • config(_:_:) Default implementation

    Default Implementation

    Configure PrivacyKit with your privacy policy and terms of service URLs.

    Declaration

    Swift

    func config(_ privacyPolicyLink: String, _ termsOfServiceLink: String)

    Parameters

    privacyPolicyLink

    Your privacy policy’s URL (e.g. https://example.com/privacy)

    termsOfServiceLink

    Your terms of service URL (e.g. https://example.com/terms)

  • setBlurView(isEnabled:) Default implementation

    Default Implementation

    Enable or disable the blur view. PrivacyKit presents on top of your current ViewController. The blur view is a transparent blur that will fog your presenting ViewController.

    Declaration

    Swift

    func setBlurView(isEnabled enabled: Bool)

    Parameters

    enabled

    The blur view should be enabled

  • setStyle(_:) Default implementation

    Default Implementation

    Update the Privacy Kit Style to a custom type that implements PrivacyKitStyle. This includes theme colors and minor UI customizations.

    Declaration

    Swift

    func setStyle(_ style: PrivacyKitStyle)

    Parameters

    style

    A custom implementation of PrivacyKitStyle. The PrivacyKitStyle protocol should be extended to determine requirements.

  • setTitle(_:) Default implementation

    Default Implementation

    Set a custom title string for the Privacy Notice View Controller.

    Declaration

    Swift

    func setTitle(_ title: String)

    Parameters

    title

    The title for the privacy notice.

  • Default Implementation

    Set a custom message for the Privacy Notice View Controller. This function automatically generates Attributed text highlighting and attaching your URL link(s) so they can be clicked and opened in Safari.

    • Example: ~~~ PrivacyKit.shared.setMessage( “My custom message with one link, and another link”, privacyPolicyLinkText: “one link”, termsLinkText: “another link”) ~~~ In this example, the message includes two string matches (the first for the privacy policy link and the second for the terms of service link. PrivacyKit matches the strings in the message while building attributed text. It then adds tap actions to both to open the associated URL and highlight the text with the current PrivacyKitStyle highlightFont

    Declaration

    Swift

    func setMessage(_ message: String, privacyPolicyLinkText: String?, termsLinkText: String?)

    Parameters

    message

    The full message including the strings to replace (if any).

    privacyPolicyLinkText

    The string to match for the privacy policy link (e.g. Privacy Policy)

    termsLinkText

    The string to match for the privacy policy link (e.g. Terms or Service)

  • setDescription(_:) Extension method

    Set a custom message for the Privacy Notice View Controller using a customized and completed Attributed String. This function skips all the automated tasks like attaching your URL links into the message so users can click and view your privacy policy or terms in Safari.

    Declaration

    Swift

    func setDescription(_ description: NSMutableAttributedString)

    Parameters

    description

    The custom message for the privacy notice.

  • enableDeny() Default implementation

    Default Implementation

    Enable the option to Deny the privacy policy. This is disabled by default as a bad practice but could be used as an Opt Out if your app can disable pushing private user data to a remote server.

    Declaration

    Swift

    func enableDeny()
  • disableDeny() Default implementation

    Default Implementation

    Disable the option to the Deny the privacy policy.

    Declaration

    Swift

    func disableDeny()