1 line
2.2 KiB
Plaintext
1 line
2.2 KiB
Plaintext
{"version":3,"file":"AdMob.js","sourceRoot":"","sources":["../../src/ios/AdMob.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAEA,wDAA+D;AAGlD,QAAA,SAAS,GAAG,mCAAqB,CAAC,cAAc,EAAE,WAAW,CAAC,CAAC;AAE5E,+EAA+E;AAC/E,iFAAiF;AACjF,8EAA8E;AAC9E,sFAAsF;AACtF,oFAAoF;AACpF,mFAAmF;AACnF,wCAAwC;AACxC,SAAgB,uBAAuB,CAAC,MAA+B;;IACrE,yBAAO,MAAM,CAAC,GAAG,0CAAE,MAAM,0CAAE,oBAAoB,mCAAI,IAAI,CAAC;AAC1D,CAAC;AAFD,0DAEC;AAED,SAAgB,uBAAuB,CACrC,MAA+B,EAC/B,EAAqD;QAArD,EAAE,wBAAwB,OAA2B,EAAzB,oDAAY;IAExC,MAAM,KAAK,GAAG,uBAAuB,CAAC,MAAM,CAAC,CAAC;IAE9C,IAAI,KAAK,KAAK,IAAI,EAAE;QAClB,OAAO,SAAS,CAAC;KAClB;IAED,uCACK,SAAS,KACZ,wBAAwB,EAAE,KAAK,IAC/B;AACJ,CAAC;AAdD,0DAcC;AAED,SAAS,cAAc,CAAC,MAA+B,EAAE,SAAoB;IAC3E,SAAS,GAAG,uBAAuB,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;IACvD,OAAO,SAAS,CAAC;AACnB,CAAC","sourcesContent":["import { ExpoConfig } from '@expo/config-types';\n\nimport { createInfoPlistPlugin } from '../plugins/ios-plugins';\nimport { InfoPlist } from './IosConfig.types';\n\nexport const withAdMob = createInfoPlistPlugin(setAdMobConfig, 'withAdMob');\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"]} |