| name | store-admob |
| description | Set up AdMob app and create ad units (banner, interstitial, rewarded) via Python+Playwright automation. Saves ad unit IDs to project config. |
| argument-hint | [ios|android|both] |
This skill sets up AdMob using Python scripts with Playwright (NOT Playwright MCP).
Zero LLM token cost for browser automation.
Step 1: Ensure Credentials
python3 ${PLUGIN_DIR}/scripts/credentials_manager.py --show
If not configured:
python3 ${PLUGIN_DIR}/scripts/credentials_manager.py --setup
Step 2: Determine Setup Parameters
Read app.json to extract:
- App name (expo.name)
- Bundle ID (expo.ios.bundleIdentifier)
- Package name (expo.android.package)
Ask the developer:
- Which ad types? (banner, interstitial, rewarded) โ default: all three
- Is the app already published? (affects AdMob app linking)
- Output format? (json or typescript)
Step 3: Run AdMob Setup Script
IMPORTANT: Tell the user:
"Browser will open. Please log into AdMob (https://apps.admob.com) if prompted."
Both platforms:
python3 ${PLUGIN_DIR}/scripts/admob_setup.py \
--app-name "{APP_NAME}" \
--platform both \
--bundle-id {BUNDLE_ID} \
--package-name {PACKAGE_NAME} \
--project .
iOS only:
python3 ${PLUGIN_DIR}/scripts/admob_setup.py \
--app-name "{APP_NAME}" \
--platform ios \
--bundle-id {BUNDLE_ID} \
--project .
Android only:
python3 ${PLUGIN_DIR}/scripts/admob_setup.py \
--app-name "{APP_NAME}" \
--platform android \
--package-name {PACKAGE_NAME} \
--project .
Custom ad types:
python3 ${PLUGIN_DIR}/scripts/admob_setup.py \
--app-name "{APP_NAME}" \
--platform both \
--bundle-id {BUNDLE_ID} \
--package-name {PACKAGE_NAME} \
--ad-types banner,interstitial \
--project .
With TypeScript output:
python3 ${PLUGIN_DIR}/scripts/admob_setup.py \
--app-name "{APP_NAME}" \
--platform both \
--bundle-id {BUNDLE_ID} \
--package-name {PACKAGE_NAME} \
--output typescript \
--project .
Dry run:
python3 ${PLUGIN_DIR}/scripts/admob_setup.py --app-name "My App" --dry-run
Step 4: Verify Output
The script saves AdMob IDs to store-deploy.json:
{
"admob": {
"ios": {
"app_id": "ca-app-pub-XXXXX~XXXXX",
"ad_units": {
"banner": "ca-app-pub-XXXXX/XXXXX",
"interstitial": "ca-app-pub-XXXXX/XXXXX",
"rewarded": "ca-app-pub-XXXXX/XXXXX"
}
},
"android": {
"app_id": "ca-app-pub-XXXXX~XXXXX",
"ad_units": {
"banner": "ca-app-pub-XXXXX/XXXXX",
"interstitial": "ca-app-pub-XXXXX/XXXXX",
"rewarded": "ca-app-pub-XXXXX/XXXXX"
}
}
}
}
If --output typescript was used, also check src/shared/config/admob.ts.
Read the output file and confirm the IDs are populated. If any are empty, the script encountered issues โ check ~/.store-deploy/error-screenshots/.
Step 5: Integrate into App
If the project uses react-native-google-mobile-ads, help configure:
- Add app IDs to
app.json:
{
"expo": {
"plugins": [
["react-native-google-mobile-ads", {
"androidAppId": "ca-app-pub-XXXXX~XXXXX",
"iosAppId": "ca-app-pub-XXXXX~XXXXX"
}]
]
}
}
- Use ad unit IDs from the generated config in the app code.
Step 6: Report
AdMob Setup Complete
====================
iOS App ID: ca-app-pub-XXXXX~XXXXX
Android App ID: ca-app-pub-XXXXX~XXXXX
Ad Units:
banner: ca-app-pub-XXXXX/XXXXX (iOS) / ca-app-pub-XXXXX/XXXXX (Android)
interstitial: ca-app-pub-XXXXX/XXXXX (iOS) / ca-app-pub-XXXXX/XXXXX (Android)
rewarded: ca-app-pub-XXXXX/XXXXX (iOS) / ca-app-pub-XXXXX/XXXXX (Android)
Config saved to: store-deploy.json
Step 7: Policy Compliance Checklist (๊ณ์ ์ ์ง ๋ฐฉ์ด)
After setup, walk the user through this checklist. These are account-level items that code alone cannot fix:
-
app-ads.txt ๊ฒ์: ๊ฐ๋ฐ์ ์น์ฌ์ดํธ ๋ฃจํธ์ app-ads.txt๋ฅผ ๊ฒ์ํ๋ค
(~/works/seungmanchoi.github.io/app-ads.txt โ https://seungmanchoi.github.io/app-ads.txt).
๋ด์ฉ์ AdMob Console โ ์ฑ โ ๋ชจ๋ ์ฑ ๋ณด๊ธฐ โ app-ads.txt ํญ์์ ํ์ธ. ํ์:
google.com, pub-XXXXXXXXXXXXXXXX, DIRECT, f08c47fec0942fa0
์คํ ์ด ๋ฆฌ์คํ
์ "๊ฐ๋ฐ์ ์น์ฌ์ดํธ"๊ฐ ๊ฐ์ ๋๋ฉ์ธ์ ๊ฐ๋ฆฌ์ผ์ผ ํฌ๋กค๋ง๋๋ค.
๋ฏธ๊ฒ์ ์ ๊ด๊ณ ๊ฒ์ฌ ์ ํ(ad serving limit)์ผ๋ก ์งํํ๋ค.
-
์คํ ์ด ๋ฆฌ์คํ
์ฐ๊ฒฐ: ์ฑ ์ถ์ ํ AdMob ์ฑ์ ์คํ ์ด ๋ฆฌ์คํ
์ ์ฐ๊ฒฐํ๋ค
(AdMob Console โ ์ฑ ์ค์ โ ์ฑ ์คํ ์ด ์ธ๋ถ์ ๋ณด). ๋ฏธ์ฐ๊ฒฐ/๋ฏธ๊ฒ์ฆ ์ํ๊ฐ
๊ธธ์ด์ง๋ฉด ๊ด๊ณ ๊ฒ์ฌ๊ฐ ์ ํ๋๋ค.
-
ํ
์คํธ ๊ธฐ๊ธฐ ๋ฑ๋ก: ์ค์ ๊ด๊ณ ๋จ์ ID๊ฐ ๋ค์ด๊ฐ internal/TestFlight ๋น๋๋ฅผ
๋ฐฐํฌํ๊ธฐ ์ , ๊ฐ๋ฐ์/ํ
์คํฐ ์ค๊ธฐ๊ธฐ๋ฅผ setRequestConfiguration({ testDeviceIdentifiers })์
๋ฑ๋กํ๋ค (ํ
ํ๋ฆฟ์ TEST_DEVICE_IDS ์์). ๋ฏธ๋ฑ๋ก ๊ธฐ๊ธฐ์ ํด๋ฆญ์ ๋ฌดํจ ํธ๋ํฝ์ผ๋ก
์ง๊ณ๋์ด ๊ณ์ ์ ์ง ์ฌ์ ๊ฐ ๋๋ค.
-
๋ณธ์ธ ๊ด๊ณ ํด๋ฆญ ์ ๋ ๊ธ์ง: ํ๋ก๋์
๋น๋์์ ๋ณธ์ธ ๊ด๊ณ ๋ฅผ ํด๋ฆญํ์ง ์๋๋ค.
์คํ ์ด ์คํฌ๋ฆฐ์ท ์ดฌ์๋ ํ
์คํธ ๊ธฐ๊ธฐ/TestIds ์ํ์์๋ง ์งํํ๋ค (์ค๊ด๊ณ ํ๋ฉด ์บก์ฒ ๊ธ์ง).