kmcgill88 / admob_flutter

Admob Flutter plugin that shows banner ads using native platform views.
https://pub.dartlang.org/packages/admob_flutter
ISC License
434 stars 151 forks source link

why I can‘t use banner ad for ios #86

Closed sunjianan9900 closed 3 years ago

sunjianan9900 commented 5 years ago

0.3.3 it's work on android but not work on ios: {error: Request Error: Cannot find an ad network adapter for mediation., errorCode: 8} no matter using test banner id or my banner id

but interstitial Ad is work on both.

i add this on my plist.info:

<key>io.flutter.embedded_views_preview</key>
    <true/>
<key>GADApplicationIdentifier</key>
    <string>ca-app-pub-XXXXX</string>

IDE : XCODE 11.2 BETA

edeuss commented 5 years ago

@kmcgill88 Can you have a look at this?

edeuss commented 5 years ago

Can you do flutter doctor -v and post the output. @sunjianan9900

sunjianan9900 commented 5 years ago

[✓] Flutter (Channel master, v1.10.5-pre.22, on Mac OS X 10.14.6 18G95, locale zh-Hans-CN) • Flutter version 1.10.5-pre.22 at /Volumes/Jianan/SDK/flutter • Framework revision ebd8e0b34b (4 weeks ago), 2019-09-19 03:38:41 -0400 • Engine revision bf3af4d157 • Dart version 2.6.0 (build 2.6.0-dev.1.0 ea969c358e)

[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2) • Android SDK at /Volumes/Jianan/SDK/sdk • Android NDK location not configured (optional; useful for native profiling support) • Platform android-29, build-tools 29.0.2 • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405) • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 10.3) • Xcode at /Volumes/Jianan/APP/Xcode.app/Contents/Developer • Xcode 10.3, Build version 10G8 • CocoaPods version 1.8.3

[✓] Android Studio (version 3.5) • Android Studio at /Applications/Android Studio.app/Contents • Flutter plugin version 39.0.3 • Dart plugin version 191.8423 • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)

[!] IntelliJ IDEA Ultimate Edition (version 2018.1.5) • IntelliJ at /Applications/IntelliJ IDEA.app ✗ Flutter plugin not installed; this adds Flutter specific functionality. ✗ Dart plugin not installed; this adds Dart specific functionality. • For information about installing plugins, see https://flutter.dev/intellij-setup/#installing-the-plugins

[!] Connected device ! No devices available

I back my xcode to 10.3 still not work

sunjianan9900 commented 4 years ago

Can you do flutter doctor -v and post the output. @sunjianan9900

Have you try ios banners?

kmcgill88 commented 4 years ago

https://stackoverflow.com/questions/41633253/cannot-find-an-ad-network-adapter

https://support.google.com/admob/thread/3813928?hl=en

kmcgill88 commented 4 years ago

https://github.com/kmcgill88/admob_flutter/blob/master/example/lib/main.dart#L245

Double check using the correct ideas for the right platform.

sunjianan9900 commented 4 years ago

https://github.com/kmcgill88/admob_flutter/blob/master/example/lib/main.dart#L245

Double check using the correct ideas for the right platform.

Thanks for your reply

I try the demo ios project , it works。 And then I copy and replace the main.dart to my project, it works too. And then I make main.dart to the second page , put an button on first page to get it , and it doesn't work. And the log print <Google> Cannot find an ad network adapter with the name(s): com.google.DummyAdapter. Remember to link all required ad network adapters and SDKs, and set -ObjC in the 'Other Linker Flags' setting of your build target. And the app stucked.

So I back to the demo project, and make the main.dart code to the second page, and it also Not work. It seems like jsut work on the first page. this is the 2file I change from the example: https://github.com/sunjianan9900/Danmupic/tree/master/demo

kmcgill88 commented 4 years ago

Have you tried replacing test id's with your own account id's? I'm currently using this code in product and I'm not having any issues. I've also seen this message while I debugged. I'm not sure what else for you to try?

sunjianan9900 commented 4 years ago

Have you tried replacing test id's with your own account id's? I'm currently using this code in product and I'm not having any issues. I've also seen this message while I debugged. I'm not sure what else for you to try?

But I can run interstitial ads and reward ads on my demo code using test ad id -> https://github.com/sunjianan9900/Danmupic/tree/master/demo (just move the ads to second page from example code , not change any id) interstitial ads and reward ads Can work anywhere , but banner only work on main.dart

It also have the same issues on my release ios app , android not have any issues

atereshkov commented 4 years ago

In my case this one helped me and now banner ads is showing in the iOS app:

Open iOS project in Xcode, go to Runner -> Targets -> Runner -> Build Phases -> Link Binary With Libraries

and here add iAd.framework

image

@kmcgill88 this one also could be documented in some "FAQ" section / etc

sunjianan9900 commented 4 years ago

In my case this one helped me and now banner ads is showing in the iOS app:

Open iOS project in Xcode, go to Runner -> Targets -> Runner -> Build Phases -> Link Binary With Libraries

and here add iAd.framework

image

@kmcgill88 this one also could be documented in some "FAQ" section / etc

it's still not work for me (cry)

WX20191029-194009@2x
jotafabric commented 4 years ago

In my case this one helped me and now banner ads is showing in the iOS app:

Open iOS project in Xcode, go to Runner -> Targets -> Runner -> Build Phases -> Link Binary With Libraries

and here add iAd.framework

image

@kmcgill88 this one also could be documented in some "FAQ" section / etc

Not work for me too

DigitalSolomon commented 4 years ago

Any improvements with this @josiasfabricio ?

jotafabric commented 4 years ago

Any improvements with this @josiasfabricio ?

Unfortunately, no

duck-dev-go commented 3 years ago

Did you figure out how to do this? We have the exact same issue

sunjianan9900 commented 3 years ago

Did you figure out how to do this? We have the exact same issue

Hey I'm using this : https://pub.dev/packages/google_mobile_ads

duck-dev-go commented 3 years ago

Yes we are too but we have the same issue, do you have any hints on how to approach the problem? We have AddMob network as our mediation group source and no other sources. But we keep getting this error.

sunjianan9900 commented 3 years ago

sorry I can't remember anything about this, it's too long ago...