-
Notifications
You must be signed in to change notification settings - Fork 276
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No such module 'google_mobile_ads' in iOS native code(Flutter plugin) #603
Comments
Hi @andj207, Thanks for filing the issue. To investigate the issue further I would need a minimal and complete sample project. |
Hi @maheshmnj here is the minimal and complete sample project. This is a flutter plugin project. Edit: Please run the "admobads_sample_plugin/example/lib/main.dart" to see the error on iOS but work well on Android. |
Thanks for the sample project @andj207, I am able to reproduce the same error, I don't really have much expertise on the native IOS, But from the error it looks like the google_mobile_ads sdk is not getting imported in the plugin, Hence the error. logs
Labeling this issue for further insights from the team, Sample project can be found here #603 (comment) cc: @jjliu15 |
@andj207 Have you found the solution? I have the same problem with you when I tried to create an Admob plugin for my apps. For me, I used |
@dtvtkien No, I'm still waiting for a fix. Currently I have to remove native ad type, just use other ads types or have to use |
@andj207 do you have any update or workaround? Thanks in advance |
I solved it by using Runner.xcworkspace instead of Runner.xcodeproj file. |
I dont get it @DaeHyeonNam , what do you mean by "Using" Runner.xcworkspace instead of Runner.xcodeproj file ? |
@Blast06 Have you tried to build the application using Runner.xcworkpsace? My error came up only when I tried to build using Runner.xcodeproj. |
We’re closing this issue due to inactivity. If you’re still impacted, please create a new issue via the Developer Forum. |
Plugin Version
google_mobile_ads: ^1.3.0
Steps to Reproduce
I create a Flutter plugin for Admob to reuse in my different projects for banner, interstitial, native ad and rewarded ads. I create it so that I can just add the plugin to other project's pubspec.yaml and use without recode or copy/paste every time.
It works fine on Android native code, the "google_mobile_ads" sdk is recognized and can be accessed without adding any dependency.
But, the problem is that the
google_mobile_ads
is not recognized in my iOS code (to create the Native Ad Factory) when Run Build in Xcode. When I use "Ctrl + Click" the "FLTNativeAdFactory" class to "Jump to Definition" in Xcode, it works but the build fail with the error. See the attached image.Here is my code and setup:
admob_ads plugin pubspec.yaml
the ios code podspec
Please help!
The text was updated successfully, but these errors were encountered: