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
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
Most helpful comment
Should be fixed in 0.17.2 version of the admob plugin