Skip to content

v1.1.0 — Zero-config Kotlin/Native test linking

Latest

Choose a tag to compare

@Meet-Miyani Meet-Miyani released this 30 Jul 17:16
2e0824a

Kotlin/Native iOS tests now link without manual setup

If your project runs :yourModule:iosSimulatorArm64Test, admob-cmp used to
fail the link with no explanation:

Undefined symbols for architecture arm64:
  "_OBJC_CLASS_$_GADBannerView", referenced from: ...

The cause was never obvious: your app gets Google's binaries from the
GoogleMobileAds Swift package, but a Kotlin/Native test executable links
without Xcode and has no access to SPM. Fixing it meant hand-copying framework
download logic, version pins, checksums and linker flags into your own build
script — and keeping them in sync with this library by hand.

That's now one line.

New: the dev.avinya.ads.admob-cmp Gradle plugin

plugins {
    id("dev.avinya.ads.admob-cmp") version "1.1.0"
}

It needs mavenCentral() in your settings' plugin repositories:

// settings.gradle.kts
pluginManagement {
    repositories {
        mavenCentral()
        gradlePluginPortal()
    }
}

The plugin:

  • downloads the GMA/UMP XCFrameworks matching the bindings this release was
    generated from — versions and checksums are generated from the library build,
    so they can't drift
  • verifies the SHA-256 of every archive before extracting a single byte
  • applies linker options to test binaries only. Your shipped app framework
    is untouched and still resolves GoogleMobileAds through SPM, exactly as before
  • adds ./gradlew doctorIos, a report-only check of your SPM products,
    Info.plist, and framework cache

Clearer failures

Both cinterop definitions now carry a userSetupHint, so if the link does fail
you get an explanation and a link to the fix instead of a bare symbol dump.

Upgrading from 1.0.2

implementation("dev.avinya.ads:admob-cmp:1.1.0")

Plus the plugins {} block above if you run Kotlin/Native tests. No source
changes required — the public ABI is byte-for-byte identical to 1.0.2.

If you previously copied XCFramework download or linker logic into your own
build script as a workaround, you can delete it.

Compatibility

admob-cmp Kotlin Compose Multiplatform Android minSdk iOS deployment target
1.1.0 2.3.20 1.11.1 26 15.0

Notes

  • The Gradle plugin is published as a separate artifact
    (dev.avinya.ads:admob-cmp-gradle-plugin) and is versioned in lockstep with
    the library. Always use matching versions.
  • Android integration is unchanged in this release.

Full changelog: v1.0.2...v1.1.0