react-native-google-mobile-ads icon indicating copy to clipboard operation
react-native-google-mobile-ads copied to clipboard

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

Open hassanjamila opened this issue 1 year ago • 4 comments

What happened?

Hello I followed the exact installation instructions but I'm keep getting this error: ios_app_id key not found in react-native-google-mobile-ads key in app.json. App will crash without it.

I'm using React native client, and this is my app.json

{ "name": "AdMobSample", "displayName": "AdMobSample", "react-native-google-mobile-ads": { "android_app_id": "ca-app-pub-xxxxxxxx~xxxxxxxx", "ios_app_id": "ca-app-pub-xxxxxxxx~xxxxxxxx" } }

Platforms

Only on iOS

React Native Info

{
  "name": "AdMobSample",
  "displayName": "AdMobSample",
  "react-native-google-mobile-ads": {
    "android_app_id": "ca-app-pub-xxxxxxxx~xxxxxxxx",
    "ios_app_id": "ca-app-pub-xxxxxxxx~xxxxxxxx"
  }
}

Are your using Typescript?

  • [X] My project is using Typescript

package.json

{
  "name": "AdMobSample",
  "version": "0.0.1",
  "private": true,
  "scripts": {
    "android": "react-native run-android",
    "ios": "react-native run-ios",
    "lint": "eslint .",
    "start": "react-native start",
    "test": "jest"
  },
  "dependencies": {
    "react": "18.2.0",
    "react-native": "0.74.3",
    "react-native-admob": "^1.3.2",
    "react-native-google-mobile-ads": "^13.6.0"
  },
  "devDependencies": {
    "@babel/core": "^7.20.0",
    "@babel/preset-env": "^7.20.0",
    "@babel/runtime": "^7.20.0",
    "@react-native/babel-preset": "0.74.85",
    "@react-native/eslint-config": "0.74.85",
    "@react-native/metro-config": "0.74.85",
    "@react-native/typescript-config": "0.74.85",
    "@types/react": "^18.2.6",
    "@types/react-test-renderer": "^18.0.0",
    "babel-jest": "^29.6.3",
    "eslint": "^8.19.0",
    "jest": "^29.6.3",
    "prettier": "2.8.8",
    "react-test-renderer": "18.2.0",
    "typescript": "5.0.4"
  },
  "engines": {
    "node": ">=18"
  },
  "packageManager": "[email protected]"
}

app.json

{
  "name": "AdMobSample",
  "displayName": "AdMobSample",
  "react-native-google-mobile-ads": {
    "android_app_id": "ca-app-pub-xxxxxxxx~xxxxxxxx",
    "ios_app_id": "ca-app-pub-xxxxxxxx~xxxxxxxx"
  }
}

ios/Podfile

No response

android/build.gradle

No response

android/app/build.gradle

No response

android/settings.gradle

No response

AndroidManifest.xml

No response

hassanjamila avatar Jul 02 '24 15:07 hassanjamila

Same here

themohitkhandal avatar Jul 22 '24 08:07 themohitkhandal

Same problem after upgrading ^13.6.0 → ^14.2.1

nes123 avatar Jul 29 '24 14:07 nes123

I managed to find a solution that solved my problem.

This was my issue, a requirement that was not needed before i updated:

https://developers.google.com/admob/ios/quick-start#update_your_infoplist

nes123 avatar Jul 29 '24 17:07 nes123

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.

github-actions[bot] avatar Aug 26 '24 17:08 github-actions[bot]