Everything in my Phonegap Build app is working, including the Analytics and FacebookConnect plugins. However, now I would like to add AdMob ads.
Phonegap Build does not provide a built-in plugin for AdMob, but according to the Phonegap Build Plugins page, you can now add your own custom plugins (see Contributing Plugins at the bottom of the page).
PhoneGap Plugins can be made compatible with PhoneGap Build with the use of a plugin.xml file...
The Phonegap Build Plugins page references the Child Browser plugins.xml on GitHub as an example of how to setup the custom plugin.xml. Below is the content of the Child Browser plugin.xml.
I'm not sure what aspects of this file I need to modify and what to modify them to. I think I have correctly setup the file structure of the Phonegap AdMob Plugins for both iOS and Android (see the file structure below), but I'm not sure how to reference these files correctly in the plugin.xml file.
<?xml version="1.0" encoding="UTF-8"?>
<plugin xmlns="http://www.phonegap.com/ns/plugins/1.0"
xmlns:android="http://schemas.android.com/apk/res/android"
id="com.phonegap.plugins.childbrowser"
version="3.0.4">
<name>Child Browser</name>
<asset src="www/childbrowser.js" target="childbrowser.js" />
<asset src="www/childbrowser" target="childbrowser" />
<!-- android -->
<platform name="android">
<config-file target="AndroidManifest.xml" parent="/manifest/application">
<activity android:name="com.phonegap.plugins.childBrowser.ChildBrowser"
android:label="@string/app_name">
<intent-filter>
</intent-filter>
</activity>
</config-file>
<!-- Cordova 1.5 - 1.9 -->
<config-file target="res/xml/plugins.xml" parent="/plugins">
<plugin name="ChildBrowser"
value="com.phonegap.plugins.childBrowser.ChildBrowser"/>
</config-file>
<!-- Cordova 2.0.0 -->
<config-file target="res/xml/config.xml" parent="/cordova/plugins">
<plugin name="ChildBrowser"
value="com.phonegap.plugins.childBrowser.ChildBrowser"/>
</config-file>
<source-file src="src/android/ChildBrowser.java"
target-dir="src/com/phonegap/plugins/childBrowser" />
</platform>
<!-- ios -->
<platform name="ios">
<plugins-plist key="ChildBrowser"
string="ChildBrowserCommand" />
<resource-file src="ChildBrowser.bundle" />
<resource-file src="ChildBrowserViewController.xib" />
<header-file src="ChildBrowserCommand.h" />
<header-file src="ChildBrowserViewController.h" />
<source-file src="ChildBrowserCommand.m" />
<source-file src="ChildBrowserViewController.m" />
</platform>
</plugin>
App File Structure
/index.html
/config.xml
/adMob
/plugin.xml
/src
/iOS
/GADAdMobExtras.h (from AdMob iOS SDK)
/GADAdNetworkExtras.h (from AdMob iOS SDK)
/GADAdSize.h (from AdMob iOS SDK)
/GADBannerView.h (from AdMob iOS SDK)
/GADBannerViewDelegate.h (from AdMob iOS SDK)
/GADInterstitial.h (from AdMob iOS SDK)
/GADInterstitialDelegate.h (from AdMob iOS SDK)
/GADRequest.h (from AdMob iOS SDK)
/GADRequestError.h (from AdMob iOS SDK)
/libGoogleAdMobAds.a (from AdMob iOS SDK)
/AdMobPlugin.h (from Phonegap Plugin for iOS)
/AdMobPlugin.js (from Phonegap Plugin for iOS)
/AdMobPlugin.m (from Phonegap Plugin for iOS)
/android
/AdMobPlugin.java (from Phonegap Plugin for Android)
/AdMobPlugin.js (from Phonegap Plugin for Android)
/GoogleAdMobAdsSdk-6.2.1.jar (from AdMob Android SDK)
Phonegap Plugin for iOS
AdMob iOS SDK
Phonegap Plugin for Android
AdMob Android SDK
For admob: its little bit confusing reading about them, because in the past they used to serve ads through JavaScript method intended for mobile web site but after google buying the company they removed this and admob doesn't serve mobile website any more and for mobile web site they advise you to use adsense. What confusing about it that there is still instruction for installing admob JavaScript which doesn't exist any more.
I saw your links and I guess you where trying to install admob for iOS app. I did it for Android app which was straight forward and it was easy but the problem was what ever I try it shows on the bottom.