Go to your AdMob console (admob.google.com), then click on your avatar. It will show your Publisher ID (something like pub-059xxxxxxxxxx028)
Now, using a browser, type the URL of your app-ads.txt.
The first line is something like this?
google.com, pub-059xxxxxxxxxx028, DIRECT, f08xxxxxxxxxxfa0
That pub-xxx
must be the same. Also, in the console, open your app and go to Ad settings (last option). That ca-app-pub-xxx~xxx must be present in your Android manifest (and also on your iOS plist). Notice that this id has a tilde (~) in it. This is your APP ID.
In the console, apps, ad units, you’ll see a similar code for each ad unit (this time, is the same code, but without the tilde (~), it has a / only (the first part is always the same). That should match as well.
So, basically:
Your app ID must be the same on AdMob and on your app configuration (android/app/src/main/AndroidManifest.xml):
<meta-data
android:name="com.google.android.gms.ads.APPLICATION_ID"
android:value="ca-app-pub-059xxxxxxxxxx028~93xxxxxx15" />
In your ios/Runner/Info.plist:
<key>GADApplicationIdentifier</key>
<string>ca-app-pub-059xxxxxxxxxx028~11xxxxxx13</string>
(Notice both are your app id, with tilde (~) and they match only in the number before the ~ (this is your publisher id, the other side is your app id, which may not be the same for Android and iOS)
And finally, your app-ads.txt that have the same pub-number (without the ~)
ca-app-pub-xxxxx~yyyyy
pub-xxxxx
ca-app-pub-xxxxx/zzzzz
xxx = Your ID
yyy = Your app ID
zzz = Your Ad Unit ID