@react-native-google-mobile-ads/inmobi 16.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,32 @@
1
+ Apache-2.0 License
2
+ ------------------
3
+
4
+ Copyright (c) 2021-present Invertase Limited <oss@invertase.io>
5
+
6
+ Licensed under the Apache License, Version 2.0 (the "License");
7
+ you may not use this library except in compliance with the License.
8
+
9
+ You may obtain a copy of the Apache-2.0 License at
10
+
11
+ http://www.apache.org/licenses/LICENSE-2.0
12
+
13
+ Unless required by applicable law or agreed to in writing, software
14
+ distributed under the License is distributed on an "AS IS" BASIS,
15
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ See the License for the specific language governing permissions and
17
+ limitations under the License.
18
+
19
+
20
+ Creative Commons Attribution 3.0 License
21
+ ----------------------------------------
22
+
23
+ Copyright (c) 2016-present Invertase Limited <oss@invertase.io>
24
+
25
+ Documentation and other instructional materials provided for this project
26
+ (including on a separate documentation repository or it's documentation website) are
27
+ licensed under the Creative Commons Attribution 3.0 License. Code samples/blocks
28
+ contained therein are licensed under the Apache License, Version 2.0 (the "License"), as above.
29
+
30
+ You may obtain a copy of the Creative Commons Attribution 3.0 License at
31
+
32
+ https://creativecommons.org/licenses/by/3.0/
package/README.md ADDED
@@ -0,0 +1,72 @@
1
+ # `@react-native-google-mobile-ads/inmobi`
2
+
3
+ InMobi **Google Ad Manager / AdMob mediation** adapter package for [`react-native-google-mobile-ads`](https://github.com/invertase/react-native-google-mobile-ads).
4
+
5
+ This package links Google’s official InMobi mediation adapter on Android and iOS. It does **not** ship AppLovin MAX, CloudX, or any JS ad APIs — use core `initialize()` / adapter status for discovery.
6
+
7
+ ## Install
8
+
9
+ ```bash
10
+ yarn add @react-native-google-mobile-ads/inmobi
11
+ # peer: react-native-google-mobile-ads
12
+ ```
13
+
14
+ Autolinking pulls in the native mediation artifacts. Rebuild the app after install.
15
+
16
+ ## Native adapter class names (GAM / AdMob UI)
17
+
18
+ | Platform | Class name |
19
+ | -------- | ---------- |
20
+ | Android | `com.google.ads.mediation.inmobi.InMobiMediationAdapter` |
21
+ | iOS | `GADMediationAdapterInMobi` |
22
+
23
+ Also exported from JS:
24
+
25
+ ```ts
26
+ import {
27
+ nativeAdapterClassName,
28
+ networkSlug,
29
+ } from '@react-native-google-mobile-ads/inmobi';
30
+ ```
31
+
32
+ ## Mediation dependencies (pinned in this package)
33
+
34
+ | Platform | Coordinate | Version pin |
35
+ | -------- | ---------- | ----------- |
36
+ | Android | `com.google.ads.mediation:inmobi` | `11.4.1.1` |
37
+ | iOS | CocoaPods `GoogleMobileAdsMediationInMobi` | `11.4.1.0` |
38
+
39
+ Citations (verify at upgrade time):
40
+
41
+ - Android (GAM): https://developers.google.com/ad-manager/mobile-ads-sdk/android/mediation/inmobi
42
+ - iOS (GAM): https://developers.google.com/ad-manager/mobile-ads-sdk/ios/mediation/inmobi
43
+ - Google Maven: `com.google.ads.mediation:inmobi` (`latest` / `release` = `11.4.1.1`)
44
+ - CocoaPods: https://cocoapods.org/pods/GoogleMobileAdsMediationInMobi
45
+ - Android host SDK: `com.inmobi.monetization:inmobi-ads-kotlin` on Maven Central (pulled transitively)
46
+
47
+ Core continues to own `play-services-ads` / `Google-Mobile-Ads-SDK`. This package does not re-pin the GMA SDK.
48
+
49
+ Platform floors align with core: iOS **15.1** and Android minSdk **24**.
50
+
51
+ > Google’s mediation guide permits Android minSdk 23 upstream; this product advertises 24 to match core.
52
+
53
+ ## Expo (optional)
54
+
55
+ ```js
56
+ // app.json / app.config.js plugins
57
+ [
58
+ '@react-native-google-mobile-ads/inmobi',
59
+ {
60
+ // Pass InMobi SKAdNetwork IDs from InMobi’s current docs
61
+ skAdNetworkItems: [/* ... */],
62
+ },
63
+ ]
64
+ ```
65
+
66
+ App IDs stay in the core Expo plugin.
67
+
68
+ ## Out of scope
69
+
70
+ - AppLovin MAX host SDK
71
+ - CloudX / other non-GAM hosts
72
+ - Fyber/DT Exchange (no Google GAM adapter — do not invent)
@@ -0,0 +1,35 @@
1
+ require 'json'
2
+
3
+ package = JSON.parse(File.read(File.join(__dir__, 'package.json')))
4
+ gam_adapter = package['gamAdapter']
5
+ mediation_pod = gam_adapter['iosPod']
6
+ mediation_version = package['sdkVersions']['ios']['googleMobileAdsMediation']
7
+
8
+ Pod::Spec.new do |s|
9
+ s.name = "RNGoogleMobileAdsAdapterInMobi"
10
+ s.version = package["version"]
11
+ s.summary = package["description"]
12
+ s.description = package["description"]
13
+ s.homepage = "https://github.com/invertase/react-native-google-mobile-ads"
14
+ s.license = package["license"]
15
+ s.authors = "Invertase Limited"
16
+ s.source = {
17
+ :git => "#{package["repository"]["url"]}.git",
18
+ :tag => "v#{s.version}"
19
+ }
20
+ # InMobi mediation adapter requires iOS 13.0+ (guide prerequisites + CocoaPods podspec).
21
+ # https://developers.google.com/ad-manager/mobile-ads-sdk/ios/mediation/inmobi
22
+ s.platforms = { :ios => "15.1" }
23
+ s.source_files = "ios/**/*.{h,m,mm,swift}"
24
+
25
+ if respond_to?(:install_modules_dependencies, true)
26
+ install_modules_dependencies(s)
27
+ else
28
+ s.dependency "React-Core"
29
+ end
30
+
31
+ # Google-published InMobi GAM mediation adapter.
32
+ # https://developers.google.com/ad-manager/mobile-ads-sdk/ios/mediation/inmobi
33
+ # https://cocoapods.org/pods/GoogleMobileAdsMediationInMobi
34
+ s.dependency mediation_pod, mediation_version
35
+ end
@@ -0,0 +1,68 @@
1
+ import groovy.json.JsonSlurper
2
+
3
+ buildscript {
4
+ ext.getExtOrDefault = { name, fallback ->
5
+ return rootProject.ext.has(name) ? rootProject.ext.get(name) : fallback
6
+ }
7
+
8
+ // AGP is only required when opening this android/ folder stand-alone.
9
+ if (project == rootProject) {
10
+ repositories {
11
+ google()
12
+ mavenCentral()
13
+ }
14
+ dependencies {
15
+ classpath("com.android.tools.build:gradle:8.6.0")
16
+ }
17
+ }
18
+ }
19
+
20
+ apply plugin: "com.android.library"
21
+
22
+ def packageJson = new JsonSlurper().parseText(file("${projectDir}/../package.json").text)
23
+ def gamAdapter = packageJson.gamAdapter
24
+ def sdkVersions = packageJson.sdkVersions.android
25
+ def mediationArtifact = "${gamAdapter.androidArtifact}:${sdkVersions.googleMobileAdsMediation}"
26
+
27
+ android {
28
+ namespace "io.invertase.googlemobileads.adapters.inmobi"
29
+
30
+ compileSdkVersion sdkVersions.compileSdk as Integer
31
+ buildToolsVersion sdkVersions.buildTools
32
+
33
+ defaultConfig {
34
+ minSdkVersion sdkVersions.minSdk as Integer
35
+ targetSdkVersion sdkVersions.targetSdk as Integer
36
+ buildConfigField "String", "GAM_ADAPTER_NETWORK", "\"${gamAdapter.network}\""
37
+ buildConfigField "String", "GAM_ADAPTER_ANDROID_CLASS", "\"${gamAdapter.androidAdapterClassName}\""
38
+ }
39
+
40
+ compileOptions {
41
+ sourceCompatibility JavaVersion.VERSION_1_8
42
+ targetCompatibility JavaVersion.VERSION_1_8
43
+ }
44
+
45
+ buildFeatures {
46
+ buildConfig true
47
+ }
48
+
49
+ sourceSets {
50
+ main {
51
+ java.srcDirs = ["src/main/java"]
52
+ }
53
+ }
54
+ }
55
+
56
+ repositories {
57
+ google()
58
+ mavenCentral()
59
+ }
60
+
61
+ dependencies {
62
+ // Google-published InMobi GAM mediation adapter.
63
+ // Pin: package.json sdkVersions.android.googleMobileAdsMediation (docs/Maven: 11.4.1.1 as of package publish; verify against current docs/Maven).
64
+ // Core GMA is provided by react-native-google-mobile-ads; do not re-pin it here.
65
+ // InMobi SDK host (`com.inmobi.monetization:inmobi-ads-kotlin`) is on Maven Central.
66
+ // https://developers.google.com/ad-manager/mobile-ads-sdk/android/mediation/inmobi
67
+ api mediationArtifact
68
+ }
@@ -0,0 +1,6 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!--
3
+ GAM adapter packages carry Google mediation artifacts only.
4
+ App ID / measurement flags live in core (react-native-google-mobile-ads).
5
+ -->
6
+ <manifest xmlns:android="http://schemas.android.com/apk/res/android" />
@@ -0,0 +1,10 @@
1
+ package io.invertase.googlemobileads.adapters.inmobi;
2
+
3
+ /**
4
+ * Package marker so the Android library module has a compilable source root.
5
+ * This package does not expose a TurboModule — mediation is linked via Gradle
6
+ * ({@code com.google.ads.mediation:inmobi}).
7
+ */
8
+ public final class AdapterPackageMarker {
9
+ private AdapterPackageMarker() {}
10
+ }
package/app.plugin.js ADDED
@@ -0,0 +1 @@
1
+ module.exports = require('./plugin/build');
@@ -0,0 +1,11 @@
1
+ #import <Foundation/Foundation.h>
2
+
3
+ /**
4
+ * Package marker so the podspec has a compilable source file.
5
+ * Mediation is linked via the GoogleMobileAdsMediationInMobi pod dependency.
6
+ */
7
+ @interface RNGoogleMobileAdsAdapterInMobiMarker : NSObject
8
+ @end
9
+
10
+ @implementation RNGoogleMobileAdsAdapterInMobiMarker
11
+ @end
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.networkSlug = exports.nativeAdapterClassName = void 0;
7
+ /**
8
+ * InMobi GAM mediation adapter package public surface.
9
+ *
10
+ * Exports adapter class-name constants for GAM UI paste / docs only. Does **not**
11
+ * add JS ad APIs — core `initialize()` adapter statuses remain the discovery
12
+ * signal (API design §5.3).
13
+ *
14
+ * Native mediation is linked via Google's published adapter:
15
+ * - Android: `com.google.ads.mediation:inmobi`
16
+ * - iOS: `GoogleMobileAdsMediationInMobi`
17
+ */
18
+
19
+ /** Network slug for this Character GAM adapter package. */
20
+ const networkSlug = exports.networkSlug = 'inmobi';
21
+
22
+ /**
23
+ * Fully-qualified native mediation adapter class names for AdMob / GAM console paste.
24
+ * @see https://developers.google.com/ad-manager/mobile-ads-sdk/android/mediation/inmobi
25
+ * @see https://developers.google.com/ad-manager/mobile-ads-sdk/ios/mediation/inmobi
26
+ */
27
+ const nativeAdapterClassName = exports.nativeAdapterClassName = {
28
+ android: 'com.google.ads.mediation.inmobi.InMobiMediationAdapter',
29
+ ios: 'GADMediationAdapterInMobi'
30
+ };
31
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["networkSlug","exports","nativeAdapterClassName","android","ios"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAOA;AACO,MAAMA,WAAW,GAAAC,OAAA,CAAAD,WAAA,GAAG,QAAiB;;AAE5C;AACA;AACA;AACA;AACA;AACO,MAAME,sBAA8C,GAAAD,OAAA,CAAAC,sBAAA,GAAG;EAC5DC,OAAO,EAAE,wDAAwD;EACjEC,GAAG,EAAE;AACP,CAAC","ignoreList":[]}
@@ -0,0 +1 @@
1
+ {"type":"commonjs"}
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+
3
+ /**
4
+ * InMobi GAM mediation adapter package public surface.
5
+ *
6
+ * Exports adapter class-name constants for GAM UI paste / docs only. Does **not**
7
+ * add JS ad APIs — core `initialize()` adapter statuses remain the discovery
8
+ * signal (API design §5.3).
9
+ *
10
+ * Native mediation is linked via Google's published adapter:
11
+ * - Android: `com.google.ads.mediation:inmobi`
12
+ * - iOS: `GoogleMobileAdsMediationInMobi`
13
+ */
14
+
15
+ /** Network slug for this Character GAM adapter package. */
16
+ export const networkSlug = 'inmobi';
17
+
18
+ /**
19
+ * Fully-qualified native mediation adapter class names for AdMob / GAM console paste.
20
+ * @see https://developers.google.com/ad-manager/mobile-ads-sdk/android/mediation/inmobi
21
+ * @see https://developers.google.com/ad-manager/mobile-ads-sdk/ios/mediation/inmobi
22
+ */
23
+ export const nativeAdapterClassName = {
24
+ android: 'com.google.ads.mediation.inmobi.InMobiMediationAdapter',
25
+ ios: 'GADMediationAdapterInMobi'
26
+ };
27
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["networkSlug","nativeAdapterClassName","android","ios"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAOA;AACA,OAAO,MAAMA,WAAW,GAAG,QAAiB;;AAE5C;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,sBAA8C,GAAG;EAC5DC,OAAO,EAAE,wDAAwD;EACjEC,GAAG,EAAE;AACP,CAAC","ignoreList":[]}
@@ -0,0 +1 @@
1
+ {"type":"module"}
@@ -0,0 +1,24 @@
1
+ /**
2
+ * InMobi GAM mediation adapter package public surface.
3
+ *
4
+ * Exports adapter class-name constants for GAM UI paste / docs only. Does **not**
5
+ * add JS ad APIs — core `initialize()` adapter statuses remain the discovery
6
+ * signal (API design §5.3).
7
+ *
8
+ * Native mediation is linked via Google's published adapter:
9
+ * - Android: `com.google.ads.mediation:inmobi`
10
+ * - iOS: `GoogleMobileAdsMediationInMobi`
11
+ */
12
+ export type NativeAdapterClassName = {
13
+ android: string;
14
+ ios: string;
15
+ };
16
+ /** Network slug for this Character GAM adapter package. */
17
+ export declare const networkSlug: "inmobi";
18
+ /**
19
+ * Fully-qualified native mediation adapter class names for AdMob / GAM console paste.
20
+ * @see https://developers.google.com/ad-manager/mobile-ads-sdk/android/mediation/inmobi
21
+ * @see https://developers.google.com/ad-manager/mobile-ads-sdk/ios/mediation/inmobi
22
+ */
23
+ export declare const nativeAdapterClassName: NativeAdapterClassName;
24
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,MAAM,MAAM,sBAAsB,GAAG;IACnC,OAAO,EAAE,MAAM,CAAC;IAChB,GAAG,EAAE,MAAM,CAAC;CACb,CAAC;AAEF,2DAA2D;AAC3D,eAAO,MAAM,WAAW,EAAG,QAAiB,CAAC;AAE7C;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,EAAE,sBAGpC,CAAC"}
@@ -0,0 +1 @@
1
+ {"type":"commonjs"}
@@ -0,0 +1,24 @@
1
+ /**
2
+ * InMobi GAM mediation adapter package public surface.
3
+ *
4
+ * Exports adapter class-name constants for GAM UI paste / docs only. Does **not**
5
+ * add JS ad APIs — core `initialize()` adapter statuses remain the discovery
6
+ * signal (API design §5.3).
7
+ *
8
+ * Native mediation is linked via Google's published adapter:
9
+ * - Android: `com.google.ads.mediation:inmobi`
10
+ * - iOS: `GoogleMobileAdsMediationInMobi`
11
+ */
12
+ export type NativeAdapterClassName = {
13
+ android: string;
14
+ ios: string;
15
+ };
16
+ /** Network slug for this Character GAM adapter package. */
17
+ export declare const networkSlug: "inmobi";
18
+ /**
19
+ * Fully-qualified native mediation adapter class names for AdMob / GAM console paste.
20
+ * @see https://developers.google.com/ad-manager/mobile-ads-sdk/android/mediation/inmobi
21
+ * @see https://developers.google.com/ad-manager/mobile-ads-sdk/ios/mediation/inmobi
22
+ */
23
+ export declare const nativeAdapterClassName: NativeAdapterClassName;
24
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,MAAM,MAAM,sBAAsB,GAAG;IACnC,OAAO,EAAE,MAAM,CAAC;IAChB,GAAG,EAAE,MAAM,CAAC;CACb,CAAC;AAEF,2DAA2D;AAC3D,eAAO,MAAM,WAAW,EAAG,QAAiB,CAAC;AAE7C;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,EAAE,sBAGpC,CAAC"}
@@ -0,0 +1 @@
1
+ {"type":"module"}
package/package.json ADDED
@@ -0,0 +1,129 @@
1
+ {
2
+ "name": "@react-native-google-mobile-ads/inmobi",
3
+ "version": "16.5.0",
4
+ "description": "InMobi Google Mobile Ads (GAM) mediation adapter for react-native-google-mobile-ads. Links the official Google mediation adapter on Android and iOS; does not add JS ad APIs.",
5
+ "author": "Invertase <oss@invertase.io> (http://invertase.io)",
6
+ "license": "Apache-2.0",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "https://github.com/invertase/react-native-google-mobile-ads",
10
+ "directory": "packages/inmobi"
11
+ },
12
+ "keywords": [
13
+ "react-native",
14
+ "google-mobile-ads",
15
+ "admob",
16
+ "mediation",
17
+ "gam",
18
+ "inmobi"
19
+ ],
20
+ "main": "lib/commonjs/index.js",
21
+ "module": "lib/module/index.js",
22
+ "react-native": "src/index.ts",
23
+ "types": "lib/typescript/commonjs/index.d.ts",
24
+ "exports": {
25
+ ".": {
26
+ "react-native": {
27
+ "types": "./lib/typescript/module/index.d.ts",
28
+ "default": "./src/index.ts"
29
+ },
30
+ "source": {
31
+ "types": "./lib/typescript/module/index.d.ts",
32
+ "default": "./src/index.ts"
33
+ },
34
+ "import": {
35
+ "types": "./lib/typescript/module/index.d.ts",
36
+ "default": "./lib/module/index.js"
37
+ },
38
+ "require": {
39
+ "types": "./lib/typescript/commonjs/index.d.ts",
40
+ "default": "./lib/commonjs/index.js"
41
+ },
42
+ "default": "./lib/commonjs/index.js"
43
+ },
44
+ "./app.plugin": "./app.plugin.js",
45
+ "./app.plugin.js": "./app.plugin.js",
46
+ "./package.json": "./package.json"
47
+ },
48
+ "files": [
49
+ "/android/",
50
+ "/ios/",
51
+ "/lib/",
52
+ "/plugin/",
53
+ "/src/",
54
+ "/LICENSE",
55
+ "/RNGoogleMobileAdsAdapterInMobi.podspec",
56
+ "/app.plugin.js",
57
+ "/react-native.config.js"
58
+ ],
59
+ "publishConfig": {
60
+ "access": "public"
61
+ },
62
+ "gamAdapter": {
63
+ "network": "inmobi",
64
+ "androidArtifact": "com.google.ads.mediation:inmobi",
65
+ "androidAdapterClassName": "com.google.ads.mediation.inmobi.InMobiMediationAdapter",
66
+ "iosPod": "GoogleMobileAdsMediationInMobi",
67
+ "iosAdapterClassName": "GADMediationAdapterInMobi"
68
+ },
69
+ "sdkVersions": {
70
+ "ios": {
71
+ "googleMobileAdsMediation": "11.4.1.0"
72
+ },
73
+ "android": {
74
+ "minSdk": 24,
75
+ "targetSdk": 36,
76
+ "compileSdk": 36,
77
+ "buildTools": "36.0.0",
78
+ "googleMobileAdsMediation": "11.4.1.1"
79
+ }
80
+ },
81
+ "react-native-builder-bob": {
82
+ "source": "src",
83
+ "output": "lib",
84
+ "targets": [
85
+ [
86
+ "commonjs",
87
+ {
88
+ "esm": true
89
+ }
90
+ ],
91
+ [
92
+ "module",
93
+ {
94
+ "esm": true
95
+ }
96
+ ],
97
+ "typescript"
98
+ ]
99
+ },
100
+ "scripts": {
101
+ "prepare": "yarn build && yarn build:plugin",
102
+ "build": "bob build",
103
+ "build:clean": "rimraf android/build && rimraf ios/build && rimraf lib && rimraf plugin/build",
104
+ "build:plugin": "yarn tsc --build plugin"
105
+ },
106
+ "peerDependencies": {
107
+ "@expo/config-plugins": ">=5.0.0",
108
+ "expo": ">=47.0.0",
109
+ "react": "*",
110
+ "react-native": ">=0.76",
111
+ "react-native-google-mobile-ads": ">=17.0.0"
112
+ },
113
+ "peerDependenciesMeta": {
114
+ "@expo/config-plugins": {
115
+ "optional": true
116
+ },
117
+ "expo": {
118
+ "optional": true
119
+ }
120
+ },
121
+ "devDependencies": {
122
+ "@expo/config-plugins": "^54.0.4",
123
+ "react-native-builder-bob": "^0.40.13",
124
+ "react-native-google-mobile-ads": "16.5.0",
125
+ "rimraf": "^6.0.1",
126
+ "typescript": "^5.9.3"
127
+ },
128
+ "gitHead": "5229e2daf94d943a9aa6c8501dd31bf9c554cd0b"
129
+ }
@@ -0,0 +1,15 @@
1
+ import { ConfigPlugin } from '@expo/config-plugins';
2
+ type PluginParameters = {
3
+ /**
4
+ * InMobi SKAdNetwork identifiers to merge into Info.plist.
5
+ * Core's Expo plugin owns app IDs; this adapter only merges mediation network rows.
6
+ * Pass identifiers from InMobi's current SKAdNetwork documentation at integrate time.
7
+ */
8
+ skAdNetworkItems?: string[];
9
+ };
10
+ /**
11
+ * Optional Expo config plugin for `@react-native-google-mobile-ads/inmobi`.
12
+ * Does not set GMA app IDs (core plugin).
13
+ */
14
+ declare const withRNGoogleMobileAdsAdapterInMobi: ConfigPlugin<PluginParameters>;
15
+ export default withRNGoogleMobileAdsAdapterInMobi;
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const config_plugins_1 = require("@expo/config-plugins");
4
+ const withAdapterSkAdNetworkItems = (config, skAdNetworkItems) => {
5
+ if (skAdNetworkItems === undefined || skAdNetworkItems.length === 0) {
6
+ return config;
7
+ }
8
+ return (0, config_plugins_1.withInfoPlist)(config, config => {
9
+ config.modResults.SKAdNetworkItems = config.modResults.SKAdNetworkItems ?? [];
10
+ const existingIdentifiers = config.modResults.SKAdNetworkItems.map((item) => item.SKAdNetworkIdentifier);
11
+ const missingIdentifiers = skAdNetworkItems.filter(identifier => !existingIdentifiers.includes(identifier));
12
+ config.modResults.SKAdNetworkItems.push(...missingIdentifiers.map(identifier => ({
13
+ SKAdNetworkIdentifier: identifier,
14
+ })));
15
+ return config;
16
+ });
17
+ };
18
+ /**
19
+ * Optional Expo config plugin for `@react-native-google-mobile-ads/inmobi`.
20
+ * Does not set GMA app IDs (core plugin).
21
+ */
22
+ const withRNGoogleMobileAdsAdapterInMobi = (config, { skAdNetworkItems } = {}) => {
23
+ return (0, config_plugins_1.withPlugins)(config, [[withAdapterSkAdNetworkItems, skAdNetworkItems]]);
24
+ };
25
+ exports.default = withRNGoogleMobileAdsAdapterInMobi;
@@ -0,0 +1,52 @@
1
+ import { ConfigPlugin, withInfoPlist, withPlugins } from '@expo/config-plugins';
2
+
3
+ type PluginParameters = {
4
+ /**
5
+ * InMobi SKAdNetwork identifiers to merge into Info.plist.
6
+ * Core's Expo plugin owns app IDs; this adapter only merges mediation network rows.
7
+ * Pass identifiers from InMobi's current SKAdNetwork documentation at integrate time.
8
+ */
9
+ skAdNetworkItems?: string[];
10
+ };
11
+
12
+ const withAdapterSkAdNetworkItems: ConfigPlugin<PluginParameters['skAdNetworkItems']> = (
13
+ config,
14
+ skAdNetworkItems,
15
+ ) => {
16
+ if (skAdNetworkItems === undefined || skAdNetworkItems.length === 0) {
17
+ return config;
18
+ }
19
+
20
+ return withInfoPlist(config, config => {
21
+ config.modResults.SKAdNetworkItems = config.modResults.SKAdNetworkItems ?? [];
22
+
23
+ const existingIdentifiers = config.modResults.SKAdNetworkItems.map(
24
+ (item: { SKAdNetworkIdentifier: string }) => item.SKAdNetworkIdentifier,
25
+ );
26
+
27
+ const missingIdentifiers = skAdNetworkItems.filter(
28
+ identifier => !existingIdentifiers.includes(identifier),
29
+ );
30
+
31
+ config.modResults.SKAdNetworkItems.push(
32
+ ...missingIdentifiers.map(identifier => ({
33
+ SKAdNetworkIdentifier: identifier,
34
+ })),
35
+ );
36
+
37
+ return config;
38
+ });
39
+ };
40
+
41
+ /**
42
+ * Optional Expo config plugin for `@react-native-google-mobile-ads/inmobi`.
43
+ * Does not set GMA app IDs (core plugin).
44
+ */
45
+ const withRNGoogleMobileAdsAdapterInMobi: ConfigPlugin<PluginParameters> = (
46
+ config,
47
+ { skAdNetworkItems } = {},
48
+ ) => {
49
+ return withPlugins(config, [[withAdapterSkAdNetworkItems, skAdNetworkItems]]);
50
+ };
51
+
52
+ export default withRNGoogleMobileAdsAdapterInMobi;
@@ -0,0 +1,9 @@
1
+ {
2
+ "extends": "expo-module-scripts/tsconfig.plugin",
3
+ "compilerOptions": {
4
+ "outDir": "build",
5
+ "rootDir": "src"
6
+ },
7
+ "include": ["./src"],
8
+ "exclude": ["**/__mocks__/*", "**/__tests__/*"]
9
+ }
@@ -0,0 +1 @@
1
+ {"root":["./src/index.ts"],"version":"5.9.3"}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Autolinking entry for the GAM adapter package.
3
+ * Adapters ship native mediation artifacts only — no TurboModule / Fabric view.
4
+ */
5
+ module.exports = {
6
+ dependency: {
7
+ platforms: {
8
+ android: {},
9
+ ios: {},
10
+ },
11
+ },
12
+ };
package/src/index.ts ADDED
@@ -0,0 +1,29 @@
1
+ /**
2
+ * InMobi GAM mediation adapter package public surface.
3
+ *
4
+ * Exports adapter class-name constants for GAM UI paste / docs only. Does **not**
5
+ * add JS ad APIs — core `initialize()` adapter statuses remain the discovery
6
+ * signal (API design §5.3).
7
+ *
8
+ * Native mediation is linked via Google's published adapter:
9
+ * - Android: `com.google.ads.mediation:inmobi`
10
+ * - iOS: `GoogleMobileAdsMediationInMobi`
11
+ */
12
+
13
+ export type NativeAdapterClassName = {
14
+ android: string;
15
+ ios: string;
16
+ };
17
+
18
+ /** Network slug for this Character GAM adapter package. */
19
+ export const networkSlug = 'inmobi' as const;
20
+
21
+ /**
22
+ * Fully-qualified native mediation adapter class names for AdMob / GAM console paste.
23
+ * @see https://developers.google.com/ad-manager/mobile-ads-sdk/android/mediation/inmobi
24
+ * @see https://developers.google.com/ad-manager/mobile-ads-sdk/ios/mediation/inmobi
25
+ */
26
+ export const nativeAdapterClassName: NativeAdapterClassName = {
27
+ android: 'com.google.ads.mediation.inmobi.InMobiMediationAdapter',
28
+ ios: 'GADMediationAdapterInMobi',
29
+ };