first commit

This commit is contained in:
2026-03-10 16:18:05 +00:00
commit 11f9c069b5
31635 changed files with 3187747 additions and 0 deletions

View File

@@ -0,0 +1,2 @@
declare const _default: import("@expo/config-plugins").ConfigPlugin;
export default _default;

View File

@@ -0,0 +1,32 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
function _withAndroidAdMob() {
const data = require("./withAndroidAdMob");
_withAndroidAdMob = function () {
return data;
};
return data;
}
function _withIosAdMob() {
const data = require("./withIosAdMob");
_withIosAdMob = function () {
return data;
};
return data;
}
function _createLegacyPlugin() {
const data = require("../createLegacyPlugin");
_createLegacyPlugin = function () {
return data;
};
return data;
}
var _default = exports.default = (0, _createLegacyPlugin().createLegacyPlugin)({
packageName: 'expo-ads-admob',
fallback: [_withAndroidAdMob().withAndroidAdMob, _withIosAdMob().withIosAdMob]
});
//# sourceMappingURL=expo-ads-admob.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"expo-ads-admob.js","names":["_withAndroidAdMob","data","require","_withIosAdMob","_createLegacyPlugin","_default","exports","default","createLegacyPlugin","packageName","fallback","withAndroidAdMob","withIosAdMob"],"sources":["../../../../src/plugins/unversioned/expo-ads-admob/expo-ads-admob.ts"],"sourcesContent":["import { withAndroidAdMob } from './withAndroidAdMob';\nimport { withIosAdMob } from './withIosAdMob';\nimport { createLegacyPlugin } from '../createLegacyPlugin';\n\nexport default createLegacyPlugin({\n packageName: 'expo-ads-admob',\n fallback: [withAndroidAdMob, withIosAdMob],\n});\n"],"mappings":";;;;;;AAAA,SAAAA,kBAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,iBAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,cAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,aAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,oBAAA;EAAA,MAAAH,IAAA,GAAAC,OAAA;EAAAE,mBAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAA2D,IAAAI,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAE5C,IAAAC,wCAAkB,EAAC;EAChCC,WAAW,EAAE,gBAAgB;EAC7BC,QAAQ,EAAE,CAACC,oCAAgB,EAAEC,4BAAY;AAC3C,CAAC,CAAC","ignoreList":[]}

View File

@@ -0,0 +1,6 @@
import { AndroidConfig, ConfigPlugin } from '@expo/config-plugins';
import { ExpoConfig } from '@expo/config-types';
export declare const withAndroidAdMob: ConfigPlugin;
export declare function getGoogleMobileAdsAppId(config: Pick<ExpoConfig, 'android'>): string | null;
export declare function getGoogleMobileAdsAutoInit(config: Pick<ExpoConfig, 'android'>): boolean;
export declare function setAdMobConfig(config: Pick<ExpoConfig, 'android'>, androidManifest: AndroidConfig.Manifest.AndroidManifest): AndroidConfig.Manifest.AndroidManifest;

View File

@@ -0,0 +1,50 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.getGoogleMobileAdsAppId = getGoogleMobileAdsAppId;
exports.getGoogleMobileAdsAutoInit = getGoogleMobileAdsAutoInit;
exports.setAdMobConfig = setAdMobConfig;
exports.withAndroidAdMob = void 0;
function _configPlugins() {
const data = require("@expo/config-plugins");
_configPlugins = function () {
return data;
};
return data;
}
const {
addMetaDataItemToMainApplication,
getMainApplicationOrThrow,
removeMetaDataItemFromMainApplication
} = _configPlugins().AndroidConfig.Manifest;
const META_APPLICATION_ID = 'com.google.android.gms.ads.APPLICATION_ID';
const META_DELAY_APP_MEASUREMENT_INIT = 'com.google.android.gms.ads.DELAY_APP_MEASUREMENT_INIT';
const withAndroidAdMob = config => {
return (0, _configPlugins().withAndroidManifest)(config, config => {
config.modResults = setAdMobConfig(config, config.modResults);
return config;
});
};
exports.withAndroidAdMob = withAndroidAdMob;
function getGoogleMobileAdsAppId(config) {
return config.android?.config?.googleMobileAdsAppId ?? null;
}
function getGoogleMobileAdsAutoInit(config) {
return config.android?.config?.googleMobileAdsAutoInit ?? false;
}
function setAdMobConfig(config, androidManifest) {
const appId = getGoogleMobileAdsAppId(config);
const autoInit = getGoogleMobileAdsAutoInit(config);
const mainApplication = getMainApplicationOrThrow(androidManifest);
if (appId) {
addMetaDataItemToMainApplication(mainApplication, META_APPLICATION_ID, appId);
addMetaDataItemToMainApplication(mainApplication, META_DELAY_APP_MEASUREMENT_INIT, String(!autoInit));
} else {
removeMetaDataItemFromMainApplication(mainApplication, META_APPLICATION_ID);
removeMetaDataItemFromMainApplication(mainApplication, META_DELAY_APP_MEASUREMENT_INIT);
}
return androidManifest;
}
//# sourceMappingURL=withAndroidAdMob.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"withAndroidAdMob.js","names":["_configPlugins","data","require","addMetaDataItemToMainApplication","getMainApplicationOrThrow","removeMetaDataItemFromMainApplication","AndroidConfig","Manifest","META_APPLICATION_ID","META_DELAY_APP_MEASUREMENT_INIT","withAndroidAdMob","config","withAndroidManifest","modResults","setAdMobConfig","exports","getGoogleMobileAdsAppId","android","googleMobileAdsAppId","getGoogleMobileAdsAutoInit","googleMobileAdsAutoInit","androidManifest","appId","autoInit","mainApplication","String"],"sources":["../../../../src/plugins/unversioned/expo-ads-admob/withAndroidAdMob.ts"],"sourcesContent":["import { AndroidConfig, ConfigPlugin, withAndroidManifest } from '@expo/config-plugins';\nimport { ExpoConfig } from '@expo/config-types';\n\nconst {\n addMetaDataItemToMainApplication,\n getMainApplicationOrThrow,\n removeMetaDataItemFromMainApplication,\n} = AndroidConfig.Manifest;\n\nconst META_APPLICATION_ID = 'com.google.android.gms.ads.APPLICATION_ID';\nconst META_DELAY_APP_MEASUREMENT_INIT = 'com.google.android.gms.ads.DELAY_APP_MEASUREMENT_INIT';\n\nexport const withAndroidAdMob: ConfigPlugin = (config) => {\n return withAndroidManifest(config, (config) => {\n config.modResults = setAdMobConfig(config, config.modResults);\n return config;\n });\n};\n\nexport function getGoogleMobileAdsAppId(config: Pick<ExpoConfig, 'android'>) {\n return config.android?.config?.googleMobileAdsAppId ?? null;\n}\n\nexport function getGoogleMobileAdsAutoInit(config: Pick<ExpoConfig, 'android'>) {\n return config.android?.config?.googleMobileAdsAutoInit ?? false;\n}\n\nexport function setAdMobConfig(\n config: Pick<ExpoConfig, 'android'>,\n androidManifest: AndroidConfig.Manifest.AndroidManifest\n) {\n const appId = getGoogleMobileAdsAppId(config);\n const autoInit = getGoogleMobileAdsAutoInit(config);\n const mainApplication = getMainApplicationOrThrow(androidManifest);\n\n if (appId) {\n addMetaDataItemToMainApplication(mainApplication, META_APPLICATION_ID, appId);\n addMetaDataItemToMainApplication(\n mainApplication,\n META_DELAY_APP_MEASUREMENT_INIT,\n String(!autoInit)\n );\n } else {\n removeMetaDataItemFromMainApplication(mainApplication, META_APPLICATION_ID);\n removeMetaDataItemFromMainApplication(mainApplication, META_DELAY_APP_MEASUREMENT_INIT);\n }\n\n return androidManifest;\n}\n"],"mappings":";;;;;;;;;AAAA,SAAAA,eAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,cAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAGA,MAAM;EACJE,gCAAgC;EAChCC,yBAAyB;EACzBC;AACF,CAAC,GAAGC,8BAAa,CAACC,QAAQ;AAE1B,MAAMC,mBAAmB,GAAG,2CAA2C;AACvE,MAAMC,+BAA+B,GAAG,uDAAuD;AAExF,MAAMC,gBAA8B,GAAIC,MAAM,IAAK;EACxD,OAAO,IAAAC,oCAAmB,EAACD,MAAM,EAAGA,MAAM,IAAK;IAC7CA,MAAM,CAACE,UAAU,GAAGC,cAAc,CAACH,MAAM,EAAEA,MAAM,CAACE,UAAU,CAAC;IAC7D,OAAOF,MAAM;EACf,CAAC,CAAC;AACJ,CAAC;AAACI,OAAA,CAAAL,gBAAA,GAAAA,gBAAA;AAEK,SAASM,uBAAuBA,CAACL,MAAmC,EAAE;EAC3E,OAAOA,MAAM,CAACM,OAAO,EAAEN,MAAM,EAAEO,oBAAoB,IAAI,IAAI;AAC7D;AAEO,SAASC,0BAA0BA,CAACR,MAAmC,EAAE;EAC9E,OAAOA,MAAM,CAACM,OAAO,EAAEN,MAAM,EAAES,uBAAuB,IAAI,KAAK;AACjE;AAEO,SAASN,cAAcA,CAC5BH,MAAmC,EACnCU,eAAuD,EACvD;EACA,MAAMC,KAAK,GAAGN,uBAAuB,CAACL,MAAM,CAAC;EAC7C,MAAMY,QAAQ,GAAGJ,0BAA0B,CAACR,MAAM,CAAC;EACnD,MAAMa,eAAe,GAAGpB,yBAAyB,CAACiB,eAAe,CAAC;EAElE,IAAIC,KAAK,EAAE;IACTnB,gCAAgC,CAACqB,eAAe,EAAEhB,mBAAmB,EAAEc,KAAK,CAAC;IAC7EnB,gCAAgC,CAC9BqB,eAAe,EACff,+BAA+B,EAC/BgB,MAAM,CAAC,CAACF,QAAQ,CAClB,CAAC;EACH,CAAC,MAAM;IACLlB,qCAAqC,CAACmB,eAAe,EAAEhB,mBAAmB,CAAC;IAC3EH,qCAAqC,CAACmB,eAAe,EAAEf,+BAA+B,CAAC;EACzF;EAEA,OAAOY,eAAe;AACxB","ignoreList":[]}

View File

@@ -0,0 +1,5 @@
import { ConfigPlugin, InfoPlist } from '@expo/config-plugins';
import { ExpoConfig } from '@expo/config-types';
export declare const withIosAdMob: ConfigPlugin;
export declare function getGoogleMobileAdsAppId(config: Pick<ExpoConfig, 'ios'>): string | null;
export declare function setGoogleMobileAdsAppId(config: Pick<ExpoConfig, 'ios'>, { GADApplicationIdentifier, ...infoPlist }: InfoPlist): InfoPlist;

View File

@@ -0,0 +1,51 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.getGoogleMobileAdsAppId = getGoogleMobileAdsAppId;
exports.setGoogleMobileAdsAppId = setGoogleMobileAdsAppId;
exports.withIosAdMob = void 0;
function _configPlugins() {
const data = require("@expo/config-plugins");
_configPlugins = function () {
return data;
};
return data;
}
const withIosAdMob = config => {
return (0, _configPlugins().withInfoPlist)(config, config => {
config.modResults = setAdMobConfig(config, config.modResults);
return config;
});
};
// NOTE(brentvatne): if the developer has installed the google ads sdk and does
// not provide an app id their app will crash. Standalone apps get around this by
// providing some default value, we will instead here assume that the user can
// do the right thing if they have installed the package. This is a slight discrepancy
// that arises in ejecting because it's possible for the package to be installed and
// not crashing in the managed workflow, then you eject and the app crashes because
// you don't have an id to fall back to.
exports.withIosAdMob = withIosAdMob;
function getGoogleMobileAdsAppId(config) {
return config.ios?.config?.googleMobileAdsAppId ?? null;
}
function setGoogleMobileAdsAppId(config, {
GADApplicationIdentifier,
...infoPlist
}) {
const appId = getGoogleMobileAdsAppId(config);
if (appId === null) {
return infoPlist;
}
return {
...infoPlist,
GADApplicationIdentifier: appId
};
}
function setAdMobConfig(config, infoPlist) {
infoPlist = setGoogleMobileAdsAppId(config, infoPlist);
return infoPlist;
}
//# sourceMappingURL=withIosAdMob.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"withIosAdMob.js","names":["_configPlugins","data","require","withIosAdMob","config","withInfoPlist","modResults","setAdMobConfig","exports","getGoogleMobileAdsAppId","ios","googleMobileAdsAppId","setGoogleMobileAdsAppId","GADApplicationIdentifier","infoPlist","appId"],"sources":["../../../../src/plugins/unversioned/expo-ads-admob/withIosAdMob.ts"],"sourcesContent":["import { ConfigPlugin, InfoPlist, withInfoPlist } from '@expo/config-plugins';\nimport { ExpoConfig } from '@expo/config-types';\n\nexport const withIosAdMob: ConfigPlugin = (config) => {\n return withInfoPlist(config, (config) => {\n config.modResults = setAdMobConfig(config, config.modResults);\n return config;\n });\n};\n\n// NOTE(brentvatne): if the developer has installed the google ads sdk and does\n// not provide an app id their app will crash. Standalone apps get around this by\n// providing some default value, we will instead here assume that the user can\n// do the right thing if they have installed the package. This is a slight discrepancy\n// that arises in ejecting because it's possible for the package to be installed and\n// not crashing in the managed workflow, then you eject and the app crashes because\n// you don't have an id to fall back to.\nexport function getGoogleMobileAdsAppId(config: Pick<ExpoConfig, 'ios'>) {\n return config.ios?.config?.googleMobileAdsAppId ?? null;\n}\n\nexport function setGoogleMobileAdsAppId(\n config: Pick<ExpoConfig, 'ios'>,\n { GADApplicationIdentifier, ...infoPlist }: InfoPlist\n): InfoPlist {\n const appId = getGoogleMobileAdsAppId(config);\n\n if (appId === null) {\n return infoPlist;\n }\n\n return {\n ...infoPlist,\n GADApplicationIdentifier: appId,\n };\n}\n\nfunction setAdMobConfig(config: Pick<ExpoConfig, 'ios'>, infoPlist: InfoPlist): InfoPlist {\n infoPlist = setGoogleMobileAdsAppId(config, infoPlist);\n return infoPlist;\n}\n"],"mappings":";;;;;;;;AAAA,SAAAA,eAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,cAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAGO,MAAME,YAA0B,GAAIC,MAAM,IAAK;EACpD,OAAO,IAAAC,8BAAa,EAACD,MAAM,EAAGA,MAAM,IAAK;IACvCA,MAAM,CAACE,UAAU,GAAGC,cAAc,CAACH,MAAM,EAAEA,MAAM,CAACE,UAAU,CAAC;IAC7D,OAAOF,MAAM;EACf,CAAC,CAAC;AACJ,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AAAAI,OAAA,CAAAL,YAAA,GAAAA,YAAA;AACO,SAASM,uBAAuBA,CAACL,MAA+B,EAAE;EACvE,OAAOA,MAAM,CAACM,GAAG,EAAEN,MAAM,EAAEO,oBAAoB,IAAI,IAAI;AACzD;AAEO,SAASC,uBAAuBA,CACrCR,MAA+B,EAC/B;EAAES,wBAAwB;EAAE,GAAGC;AAAqB,CAAC,EAC1C;EACX,MAAMC,KAAK,GAAGN,uBAAuB,CAACL,MAAM,CAAC;EAE7C,IAAIW,KAAK,KAAK,IAAI,EAAE;IAClB,OAAOD,SAAS;EAClB;EAEA,OAAO;IACL,GAAGA,SAAS;IACZD,wBAAwB,EAAEE;EAC5B,CAAC;AACH;AAEA,SAASR,cAAcA,CAACH,MAA+B,EAAEU,SAAoB,EAAa;EACxFA,SAAS,GAAGF,uBAAuB,CAACR,MAAM,EAAEU,SAAS,CAAC;EACtD,OAAOA,SAAS;AAClB","ignoreList":[]}