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
689 stars 139 forks source link

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

Closed hassanjamila closed 1 month ago

hassanjamila commented 3 months ago

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?

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": "yarn@3.6.4"
}

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

themohitkhandal commented 3 months ago

Same here

nes123 commented 3 months ago

Same problem after upgrading ^13.6.0 → ^14.2.1

nes123 commented 3 months ago

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

github-actions[bot] commented 2 months 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.