Platform differences
The Swift and Kotlin implementations follow the same TypeScript specs. These are the differences that reach your code or build.
| Topic | iOS | Android |
|---|---|---|
| Ads SDK | Google Mobile Ads SDK 13 (13.13.0 or later), Swift Package Manager | GMA Next-Gen SDK ads-mobile-sdk 1.7.0 |
| Minimum OS | iOS 16 | NitroUI's minimum |
| App ID source | GADApplicationIdentifier in Info.plist | com.google.android.gms.ads.APPLICATION_ID meta-data in AndroidManifest.xml |
AdmobError.code | Numeric GADErrorCode as a string | SDK ErrorCode name |
| Banner units | Points | dp |
| Foreground signal | UIApplication.willEnterForegroundNotification | ProcessLifecycleOwner ON_START, ignoring the first one (cold start) |
| SDK start | On the main thread | On a background thread |
| Extra Gradle changes | None | Adds androidx.lifecycle:lifecycle-process; excludes org.chromium.net:cronet-embedded |
testAdUnitId values | Google's iOS sample units | Google's Android sample units |
Google's sample ad units
Admob.testAdUnitId(format) returns these:
| Format | iOS | Android |
|---|---|---|
banner | ca-app-pub-3940256099942544/2435281174 | ca-app-pub-3940256099942544/9214589741 |
interstitial | ca-app-pub-3940256099942544/4411468910 | ca-app-pub-3940256099942544/1033173712 |
rewarded | ca-app-pub-3940256099942544/1712485313 | ca-app-pub-3940256099942544/5224354917 |
rewardedInterstitial | ca-app-pub-3940256099942544/6978759866 | ca-app-pub-3940256099942544/5354046379 |
appOpen | ca-app-pub-3940256099942544/5575463023 | ca-app-pub-3940256099942544/9257395921 |