invertase / react-native-google-mobile-ads

React Native Google Mobile Ads enables you to monetize your app with AdMob.
https://docs.page/invertase/react-native-google-mobile-ads
Other
636 stars 128 forks source link

[🐛] error: ios_app_id key not found in react-native-google-mobile-ads key in app.json. App will crash without it. #382

Closed tnylee closed 1 year ago

tnylee commented 1 year ago

What happened?

I followed this documentation and installed react-native-google-mobile-ads version 10.2.0.

I made sure that the react-native-google-mobile-ads block is outside of expo in app.json.

Then I ran npx expo prebuild --clean and expo run:ios.

On app start up I got this error:

❌  error: ios_app_id key not found in react-native-google-mobile-ads key in app.json. App will crash without it.

Platforms

iOS, but have not tested behavior on Android

React Native Info

System:
    OS: macOS 13.2.1
    CPU: (12) x64 Apple M2 Pro
    Memory: 23.33 MB / 16.00 GB
    Shell: 5.8.1 - /bin/zsh
  Binaries:
    Node: 14.17.5 - /usr/local/bin/node
    Yarn: 1.22.10 - /usr/local/bin/yarn
    npm: 9.6.4 - /usr/local/bin/npm
    Watchman: 2023.04.03.00 - /usr/local/bin/watchman
  Managers:
    CocoaPods: 1.12.0 - /usr/local/bin/pod
  SDKs:
    iOS SDK:
      Platforms: DriverKit 22.2, iOS 16.2, macOS 13.1, tvOS 16.1, watchOS 9.1
    Android SDK: Not Found
  IDEs:
    Android Studio: 2021.1 AI-211.7628.21.2111.8309675
    Xcode: 14.2/14C18 - /usr/bin/xcodebuild
  Languages:
    Java: 10.0.1 - /usr/bin/javac
  npmPackages:
    @react-native-community/cli: Not Found
    react: 18.2.0 => 18.2.0 
    react-native: 0.71.7 => 0.71.7 
    react-native-macos: Not Found
  npmGlobalPackages:
    *react-native*: Not Found

Are your using Typescript?

package.json

{
  "scripts": {
    "start": "expo start --dev-client",
    "android": "expo run:android",
    "ios": "expo run:ios",
    "web": "expo start --web",
    "eject": "expo eject",
    "postinstall": "node ./src/scripts/stfu.js"
  },
  "dependencies": {
    "@config-plugins/react-native-branch": "^5.0.0",
    "@expo/vector-icons": "^13.0.0",
    "@react-native-async-storage/async-storage": "1.17.11",
    "@react-native-community/datetimepicker": "6.7.3",
    "@react-native-community/picker": "1.8.1",
    "@react-native-community/slider": "4.4.2",
    "@react-native-community/viewpager": "5.0.11",
    "@react-native-masked-view/masked-view": "0.2.8",
    "@segment/analytics-react-native": "^2.5.1",
    "@segment/sovran-react-native": "^0.4.3",
    "@sentry/react-native": "4.13.0",
    "@shankarmorwal/rn-viewpager": "^1.3.1",
    "@use-expo/font": "^2.0.0",
    "add": "^2.0.6",
    "axios": "^0.24.0",
    "card-validator": "^8.1.1",
    "compare-versions": "^4.1.2",
    "expo": "~48.0.15",
    "expo-activity-feed": "^1.1.1",
    "expo-apple-authentication": "~6.0.1",
    "expo-application": "~5.1.1",
    "expo-asset": "~8.9.1",
    "expo-auth-session": "~4.0.3",
    "expo-av": "~13.2.1",
    "expo-blur": "~12.2.2",
    "expo-camera": "~13.2.1",
    "expo-clipboard": "~4.1.2",
    "expo-constants": "~14.2.1",
    "expo-contacts": "~12.0.1",
    "expo-crypto": "~12.2.1",
    "expo-dev-client": "~2.2.1",
    "expo-device": "~5.2.1",
    "expo-file-system": "~15.2.2",
    "expo-firebase-analytics": "~7.0.0",
    "expo-firebase-recaptcha": "~2.2.0",
    "expo-font": "~11.1.1",
    "expo-haptics": "~12.2.1",
    "expo-image-manipulator": "~11.1.1",
    "expo-image-picker": "~14.1.1",
    "expo-keep-awake": "~12.0.1",
    "expo-linear-gradient": "~12.1.2",
    "expo-linking": "~4.0.1",
    "expo-localization": "~14.1.1",
    "expo-location": "~15.1.1",
    "expo-mail-composer": "~12.1.1",
    "expo-media-library": "~15.2.3",
    "expo-notifications": "~0.18.1",
    "expo-sms": "~11.2.1",
    "expo-splash-screen": "~0.18.2",
    "expo-status-bar": "~1.4.4",
    "expo-store-review": "~6.2.1",
    "expo-system-ui": "~2.2.1",
    "expo-tracking-transparency": "~3.0.3",
    "expo-updates": "~0.16.4",
    "expo-web-browser": "~12.1.1",
    "firebase": "9.21.0",
    "form-data": "^4.0.0",
    "geolib": "^3.3.1",
    "i18n-js": "^3.7.1",
    "install": "^0.13.0",
    "moment": "^2.27.0",
    "moment-timezone": "^0.5.34",
    "omise-react-native": "https://github.com/tnylee/omise-react-native.git",
    "react": "18.2.0",
    "react-dom": "18.2.0",
    "react-native": "0.71.7",
    "react-native-actionsheet": "^2.4.2",
    "react-native-animated-pagination-dots": "^0.1.72",
    "react-native-autolink": "^4.0.0",
    "react-native-branch": "^5.4.0",
    "react-native-calendars": "^1.1274.0",
    "react-native-currency-input": "^1.0.1",
    "react-native-dropdownalert": "^4.5.0",
    "react-native-elements": "^3.4.2",
    "react-native-fast-image": "^8.5.11",
    "react-native-fbsdk-next": "11.1.0",
    "react-native-gesture-handler": "~2.9.0",
    "react-native-google-mobile-ads": "10.2.0",
    "react-native-google-places-autocomplete": "^2.4.1",
    "react-native-iap": "8.6.5",
    "react-native-image-crop-picker": "^0.37.3",
    "react-native-image-zoom-viewer": "^3.0.1",
    "react-native-keyboard-aware-scroll-view": "^0.9.5",
    "react-native-keyboard-manager": "^6.5.4-3",
    "react-native-modal": "^13.0.0",
    "react-native-modal-datetime-picker": "^13.0.0",
    "react-native-onboarding-swiper": "^1.1.4",
    "react-native-page-control": "^1.1.2",
    "react-native-paper": "^4.11.1",
    "react-native-reanimated": "~2.14.4",
    "react-native-safe-area-context": "4.5.0",
    "react-native-screens": "~3.20.0",
    "react-native-segmented-control-tab": "^4.0.0",
    "react-native-share": "^7.3.9",
    "react-native-svg": "13.4.0",
    "react-native-swipe-gestures": "^1.0.5",
    "react-native-swipe-list-view": "^3.2.9",
    "react-native-vector-icons": "^9.0.0",
    "react-native-view-shot": "3.5.0",
    "react-native-web": "~0.18.10",
    "react-native-webview": "11.26.0",
    "react-navigation": "^4.4.4",
    "react-navigation-stack": "^2.8.2",
    "react-navigation-tabs": "^2.9.0",
    "sentry-expo": "~6.1.0",
    "unique-names-generator": "^4.6.0",
    "upgrade": "^1.1.0",
    "with-rn-image-crop-picker": "^0.2.0",
    "yarn": "^1.22.19"
  },
  "devDependencies": {
    "@babel/core": "^7.12.9",
    "babel-plugin-module-resolver": "^4.1.0",
    "babel-preset-expo": "^9.3.0",
    "prettier": "2.5.1",
    "react-native-svg-transformer": "^1.0.0"
  },
  "name": "wegowhere",
  "version": "1.0.0"
}

app.json

{
  "expo": {

  },
  "react-native-google-mobile-ads": {
    "android_app_id": "ca-app-pub-...",
    "ios_app_id": "ca-app-pub-..."
  }
}

ios/Podfile

No response

android/build.gradle

No response

android/app/build.gradle

No response

android/settings.gradle

No response

AndroidManifest.xml

No response

github-actions[bot] commented 1 year ago

Hello 👋, to help manage issues we automatically close stale issues.

This issue has been automatically marked as stale because it has not had activity for quite some time.Has this issue been fixed, or does it still require attention?

This issue will be closed in 15 days if no further activity occurs.

Thank you for your contributions.