Internal Kotlin Multiplatform code shared between the OneSignal Android and iOS SDKs. This repository is the single source of truth for shared logic; each platform SDK consumes it as a git submodule pinned to a tag so both release in parity.
This is not published to any public artifact repository. It is consumed only by the internal OneSignal Android and iOS SDK teams.
:kmp— the single umbrella module for all shared multiplatform code, published ascom.onesignal:kmp. New shared features land as sibling packages inside this one module (so iOS links a single framework) rather than as new Gradle modules. Today it contains:com.onesignal.logger— platform-agnostic logging/telemetry pipeline (OTLP/protobuf encoder, batch processor, crash capture + upload) with no platform, networking, or storage coupling. All logic lives incommonMain; platform values are injected via interfaces (ILoggerPlatformProvider,ILogHttpSender,ILogFileStore,ILogger) that each SDK implements in its own repo.
androidTarget, iosX64, iosArm64, iosSimulatorArm64.
./gradlew :kmp:testDebugUnitTest # JVM/Android unit tests
./gradlew :kmp:iosSimulatorArm64Test # iOS simulator (Kotlin/Native) tests
./gradlew spotlessCheck # formattingCI (.github/workflows/ci.yml) runs all of the above on every push and PR using a
macOS runner (required for the iOS simulator tests).
Each SDK adds this repo as a git submodule and includes :kmp as a Gradle source
project (no binary artifact). The module's build.gradle is written to resolve under
both this repo's root and the host SDK root, so a single source file works in both
contexts.
To release Android and iOS in lockstep: tag this repo, then bump the submodule pointer to that tag in both SDK repos.
Releases are cut from the Release workflow (.github/workflows/release.yml) — no
manual tagging or version bookkeeping required.
- Go to Actions → Release → Run workflow.
- Pick a bump type (
patch/minor/major) and whether to open the Android bump PR. - The workflow then:
- verifies the code (spotless + JVM/Android + iOS simulator tests),
- computes the next
vX.Y.Zfrom the latest tag (e.g. latestv0.1.0+minor→v0.2.0; first release starts fromv0.0.0), - creates the tag and a GitHub Release with auto-generated notes, and
- (if selected) opens a PR in
OneSignal-Android-SDKthat re-points the submodule gitlink to the new tag.
Review and merge the Android PR to complete that side of the release.
iOS bumping is deferred until this repo builds and publishes an XCFramework. Once the
packaging block + publish step exist, a bump-ios job mirroring bump-android will
open a version-bump PR against the iOS SDK's SPM/CocoaPods manifest.
The Android bump PR is opened by a reusable workflow in the Android repo
(.github/workflows/bump-kmp-submodule.yml), which this workflow calls and passes the
shared org push token to — the same GH_PUSH_TOKEN used across the other OneSignal SDK
repos (sdk-shared, the wrapper SDKs, etc.). No dedicated GitHub App or new secret is
created; the default GITHUB_TOKEN cannot write to another repo, but GH_PUSH_TOKEN
can.
To enable it, an org admin grants this repo access to the existing org secret:
Org → Settings → Secrets and variables → Actions → GH_PUSH_TOKEN → Repository
access → add OneSignal-KMP-SDK.
Without that access, run the workflow with open_android_pr unchecked to tag + release only, then bump the Android submodule manually.