diff --git a/docs/guides/integration-mobile-client-side.md b/docs/guides/integration-mobile-client-side.md index c90fb9c92..8b794db26 100644 --- a/docs/guides/integration-mobile-client-side.md +++ b/docs/guides/integration-mobile-client-side.md @@ -705,7 +705,7 @@ If the response status indicates that the DII has been opted out of UID2, you mi ## Optional: UID2 Prebid Mobile SDK Integration :::important -The UID2 Prebid Mobile SDK integration is for Android only, and requires version 1.4.0 of the SDK for Android. +The UID2 Prebid Mobile SDK integration requires version 1.4.0 of the UID2 SDK for Android, or version 1.5.0 of the UID2 SDK for iOS. ::: diff --git a/docs/guides/integration-prebid.md b/docs/guides/integration-prebid.md index 45fe18231..55db45e95 100644 --- a/docs/guides/integration-prebid.md +++ b/docs/guides/integration-prebid.md @@ -75,6 +75,6 @@ For detailed instructions, refer to one of the following integration guides: ## Prebid Mobile SDK Support for Mobile Devices -UID2 integration with Prebid is supported for Android mobile devices using the Prebid Mobile SDK. +UID2 integration with Prebid is supported for Android and iOS mobile devices using the Prebid Mobile SDK. For details, see [UID2 Mobile Integration for Prebid Mobile SDK](integration-prebid-mobile-summary.md). diff --git a/docs/snippets/_mobile-docs-enable-logging.mdx b/docs/snippets/_mobile-docs-enable-logging.mdx index 7435b50fc..c65cd7f2c 100644 --- a/docs/snippets/_mobile-docs-enable-logging.mdx +++ b/docs/snippets/_mobile-docs-enable-logging.mdx @@ -18,7 +18,8 @@ UID2Manager.init( ```swift -// On iOS, you must set UID2Settings before you first access UID2Manager.shared. Changes made to settings after first access are not read. +// On iOS, you must set UID2Settings before you first access UID2Manager.shared. +// Changes made to settings after first access are not read. UID2Settings.shared.isLoggingEnabled = true ``` diff --git a/docs/snippets/_mobile_docs_prebid-mobile.mdx b/docs/snippets/_mobile_docs_prebid-mobile.mdx index 5a3ccd850..e2638c1c9 100644 --- a/docs/snippets/_mobile_docs_prebid-mobile.mdx +++ b/docs/snippets/_mobile_docs_prebid-mobile.mdx @@ -1,7 +1,7 @@ import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; -This section is for participants who want to integrate with UID2 and use the [Prebid Mobile SDK](https://prebid.org/product-suite/prebid-mobile/) for header bidding in Android applications. +This section is for participants who want to integrate with UID2 and use the [Prebid Mobile SDK](https://prebid.org/product-suite/prebid-mobile/) for header bidding in Android and iOS applications. The UID2 Prebid integration monitors the state of the `UID2Identity`. Whenever the state changes, the Prebid integration automatically updates Prebid’s external user IDs. This includes when an identity is refreshed, resulting in a new advertising token. @@ -13,92 +13,20 @@ This integration requires a Prebid Server setup. To configure your UID2 Prebid for Mobile integration, follow the steps below. -1. Set up Prebid's Mobile SDK for Android, following the steps in [Prebid SDK Integration for Android](https://docs.prebid.org/prebid-mobile/pbm-api/android/code-integration-android.html). +1. Set up Prebid's Mobile SDK, following the steps in [Prebid SDK Integration for Android](https://docs.prebid.org/prebid-mobile/pbm-api/android/code-integration-android.html) or [Prebid SDK Integration for iOS](https://docs.prebid.org/prebid-mobile/pbm-api/ios/code-integration-ios.html). 2. Add the UID2 Mobile SDK to your app, following the steps in [Add the UID2 Mobile SDK to Your Mobile App](#add-the-uid2-mobile-sdk-to-your-mobile-app). 3. The UID2 Prebid integration is distributed as a separate module, so you must add it as a dependency in your project. Follow the installation instructions that apply to your integration, out of the following options: - - **Gradle**: Include the following in your Gradle configuration: - ```js - implementation("com.uid2:uid2-android-sdk-prebid:1.4.0") - ``` - - - **Maven**: To install with Maven, add the SDK as a dependency in the `pom.xml` file: - ```xml - - com.uid2 - uid2-android-sdk-prebid - 1.4.0 - - ``` - -4. After adding the dependency, you'll need to configure the integration. First initialize the `UID2Manager`, and then Prebid, as shown in the following examples. - - - - ```js - UID2Manager.init(context = this) - - PrebidMobile.initializeSdk(this) { Log.i(TAG, "Prebid: $it") } - prebid = UID2Prebid().apply { - initialize() - } - ``` - - - ```js - UID2Manager.init(this); - - PrebidMobile.initializeSdk(this, status -> Log.i(TAG, "Prebid: " + status)); - - prebid = new UID2Prebid(); - prebid.initialize(); - ``` - - - -5. Configure a callback that's passed in during initialization. - - The UID2 Prebid integration periodically updates Prebid by setting the relevant external IDs when a new identity is generated or an existing token is refreshed. - - This process is destructive, which means that if your application uses external IDs from another source, you'll need to provide those to the UID2 Prebid integration so that all external IDs are retained while the UID2 token is updated. - - This is done via the callback, which must be passed in during initialization, as shown in the following examples. - - - - ```js - prebid = UID2Prebid( - externalUserIdFactory = ::getExternalIds, - ).apply { - initialize() - } - ``` - - - ```js - prebid = new UID2Prebid(UID2Manager.getInstance(), () -> getExternalIds()); - prebid.initialize(); - ``` - - - - +