Capacitor: cordova "ordova-plugin-admob-free" doesn't work with capacitor

Created on 21 Jun 2018  路  6Comments  路  Source: ionic-team/capacitor

when I add cordova-plugin-admob-free with npm install cordova-plugin-admob-free and then npx cap sync , xcode build give me error bellow :

'CDVViewController.h' file not found

Most helpful comment

Should be fixed in 0.17.2 version of the admob plugin

All 6 comments

Are you sure it's 'CDVViewController.h' file not found and not "MainViewController.h" file not found?

The plugin you mention doesn't have the import for CDVViewController.h, also, even if it had it, it should work as we have that class in our compatibility layer.

I've tested and I get "MainViewController.h" file not found, which makes sense as we don't have that class on the compatibility layer.
Bad news is we won't add that class.
Good news is I've sent a PR to remove the import from the Admob plugin class. https://github.com/ratson/cordova-plugin-admob-free/pull/254

I can't guarantee that the plugin will work after that change as I don't have an AdMob account to test, but tried to show a banner and a black box appeared.

You can try installing my fork or just removing the failing import and see if it works

thank you @jcesarmobile for your help.

I'll try to remove this line and I'll give you the result.

You are right @jcesarmobile , "MainViewController.h", it works now like a charm.

thank you very much

Thanks for letting us know.
Let's hope the plugin author merges my PR

Should be fixed in 0.17.2 version of the admob plugin

thank you @jcesarmobile

Was this page helpful?
0 / 5 - 0 ratings

Related issues

nicobytes picture nicobytes  路  3Comments

moberwasserlechner picture moberwasserlechner  路  3Comments

ebk46 picture ebk46  路  3Comments

daniel-lucas-silva picture daniel-lucas-silva  路  3Comments

peterpeterparker picture peterpeterparker  路  3Comments