Skip to content

Conversation

@robertjamison
Copy link
Contributor

No description provided.

This commit updates the library version to `1.0.0-beta06`, updates several key dependencies, and re-enables publication signing.

*   **Version Update:**
    *   The library version in `gradle/libs.versions.toml` has been updated from `1.0.0-beta05` to `1.0.0-beta06`.

*   **Dependency Updates:**
    *   **Kotlin:** `2.2.20` -> `2.2.21`
    *   **Compose:** `1.9.0` -> `1.9.1`
    *   **Google Play Services Ads:** `24.6.0` -> `24.7.0`
    *   **Dokka:** `2.1.0-Beta` -> `2.1.0`
    *   **Kover:** `0.9.2` -> `0.9.3`

*   **Build Configuration:**
    *   Re-enabled `signAllPublications()` in `build.gradle.kts` to sign artifacts for Maven Central publishing.

Signed-off-by: Robert Jamison <65142411+robertjamison@users.noreply.github.com>
Signed-off-by: Robert Jamison <65142411+robertjamison@users.noreply.github.com>
This commit implements the `openDebugMenu` function for the iOS platform, enabling the Google Mobile Ads ad inspector.

*   **`BasicAds.kt` (iOS):**
    *   The `openDebugMenu` function, which was previously a no-op, now calls `GADMobileAds.sharedInstance.presentAdInspectorFromViewController`.
    *   This provides feature parity with Android by allowing developers to open the ad inspector for debugging purposes.
    *   An `AdException` is thrown if an error occurs while presenting the inspector.

Signed-off-by: Robert Jamison <65142411+robertjamison@users.noreply.github.com>
This commit refactors the completion handler for `presentAdInspectorFromViewController` within the `openDebugMenu` function on iOS.

The implementation is updated to use a more concise `let` block for null-checking the error object. It now correctly throws an `AdException` only when an actual error is present, whereas the previous implementation would throw an exception even on a successful completion.

Signed-off-by: Robert Jamison <65142411+robertjamison@users.noreply.github.com>
@robertjamison robertjamison self-assigned this Oct 24, 2025
@robertjamison robertjamison added documentation Improvements or additions to documentation enhancement New feature or request dependencies Pull requests that update a dependency file labels Oct 24, 2025
@robertjamison robertjamison linked an issue Oct 24, 2025 that may be closed by this pull request
This commit updates several core dependencies across Android, iOS, and the build system.

*   **Dependency Updates:**
    *   **Android Gradle Plugin:** `8.13.0` -> `8.13.1`
    *   **Compose:** `1.9.1` -> `1.9.3`
    *   **Google Play Services Ads:** `24.7.0` -> `24.8.0`
    *   **Android UMP:** `3.2.0` -> `4.0.0`
    *   **CocoaPods AdMob:** `12.12.0` -> `12.14.0`
    *   **CocoaPods UMP:** `3.0.0` -> `3.1.0`
    *   **Maven Publish Plugin:** `0.34.0` -> `0.35.0`

*   **Documentation:**
    *   The `VERSIONS.md` file has been updated to reflect the new dependency versions for the `1.0.0-beta06` release.
@robertjamison robertjamison linked an issue Nov 23, 2025 that may be closed by this pull request
This commit fixes a bug in the `toCommon()` extension function for `GADAdSize` on the iOS platform.

Previously, when converting a `GADAdSize` to the common `AdSize` class, the `height` property was incorrectly being assigned the value of the ad's `width`.

This has been corrected to use the `height` from the `GADAdSize`, ensuring that the dimensions of the ad size are mapped correctly.
@robertjamison robertjamison linked an issue Nov 23, 2025 that may be closed by this pull request
robertjamison and others added 5 commits November 23, 2025 12:29
This commit introduces a new annotation, `@ExperimentalBasicAdsFeature`, to mark APIs within the library that are considered experimental and may be subject to change or removal in future releases.

*   **New Annotation:**
    *   A new annotation class, `ExperimentalBasicAdsFeature`, has been added in `commonMain`.
    *   It is a `@RequiresOptIn` annotation with a level of `ERROR`. This requires developers to explicitly opt-in to use any API marked with it, making them aware of its experimental nature.
    *   This provides a clear mechanism for managing the API surface by distinguishing between stable and experimental features.
This commit refactors the `Consent` API to align with modern Kotlin conventions, replacing getter functions with properties and introducing more granular, coroutine-friendly callbacks.

*   **API Modernization:**
    *   In `Consent`, `ConsentRequestParameters`, and `ConsentDebugSettings`, functions like `canRequestAds()`, `isPrivacyOptionsRequired()`, and `getConsentDebugSettings()` have been converted to read-only properties (`canRequestAds`, `privacyOptionsRequired`, `consentDebugSettings`).
    *   The deprecated `isPrivacyOptionsRequired()` and `canRequestAds()` functions remain for backward compatibility.

*   **Improved Callback Granularity:**
    *   The `requestConsentInfoUpdate` function no longer automatically triggers the consent form. It now provides an `onCompletion` callback to signal that the consent status has been updated.
    *   The `loadAndShowConsentForm` function now offers distinct `onLoaded` and `onShown` callbacks, giving developers finer control over the UI flow.
    *   All asynchronous functions now provide default empty lambda implementations for their callbacks, making them optional.

*   **Implementation Refactoring (Android & iOS):**
    *   The `actual` implementations of `Consent` on both platforms have been updated to remove internal state management (`MutableState`). The new properties compute their values directly from the underlying UMP SDK on each access.
    *   The logic has been updated to support the new, more explicit callback system.

*   **Documentation:**
    *   Comprehensive KDoc has been added to the `Consent` API in `commonMain` to clearly explain the purpose of each function, property, and callback.
* Support ServerSideVerificationOptions

: userId, customData

* Add userId, customData for RewardedAd() / RememberRewardedAd()
This commit introduces dedicated, overloaded functions for loading Rewarded Ads with Server-Side Verification (SSV), making the API more explicit and type-safe.

*   **API Overloads for SSV:**
    *   New overloads have been added for the `RewardedAd` and `rememberRewardedAd` composables, and the `RewardedAdHandler.load` function.
    *   These new functions require non-nullable `userId` and `customData` string parameters, ensuring that all necessary information for SSV is provided.
    *   The original functions have been updated to no longer accept `userId` or `customData`, clearly separating the API for standard rewarded ads from those using SSV.

*   **Platform Implementation:**
    *   The `actual` implementations of `RewardedAdHandler` on both Android and iOS have been updated to handle these new overloads, correctly configuring `ServerSideVerificationOptions` when `userId` and `customData` are provided.

*   **Refactor:**
    *   The `RewardItem` class on Android has been refactored to use property getters (`get()`) for `amount` and `type`, delegating directly to the underlying Google Mobile Ads SDK object.
@robertjamison robertjamison merged commit abbc651 into main Nov 23, 2025
5 checks passed
@robertjamison robertjamison deleted the v1.0.0-beta06 branch November 23, 2025 19:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file documentation Improvements or additions to documentation enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve Consent class implementation Ad size in iOS setting wrong height Ad Inspector

3 participants