Giter Site home page Giter Site logo

cordova-iad-pro's Introduction

iAd Plugin Pro

Present Apple iAd in Mobile App/Games natively from JavaScript.

Highlights:

  • Easy-to-use APIs. Display Ad with single line of Js code.
  • Support Banner, Interstitial Ad.
  • Multiple banner size, also support custom size.
  • Fixed and overlapped mode.
  • Auto fit on orientation change.
  • Same API with other RjFun Ad plugins, easily switch to other Ad networks.

Compatible with:

  • Cordova CLI, v3.5+
  • Intel XDK and Crosswalk, r1095+
  • IBM Worklight, v6.2+

How to use?

If use with Cordova CLI:

cordova plugin add com.rjfun.cordova.iad

If use with Intel XDK: Project -> CORDOVA 3.X HYBRID MOBILE APP SETTINGS -> PLUGINS AND PERMISSIONS -> Third-Party Plugins -> Add a Third-Party Plugin -> Get Plugin from the Web, input:

Name: iAdPluginPro
Plugin ID: com.rjfun.cordova.iad
[x] Plugin is located in the Apache Cordova Plugins Registry

Quick Start

Before using the plugin in your project, please verify the plugin by build the demo index.html coming with the plugin:

cordova create test1 com.rjfun.test1 test1;
cd test1;
cordova platform add ios;
cordova plugin add com.rjfun.cordova.iad;
rm -r www/*;
cp -r plugins/com.rjfun.cordova.iad/test/* www/;
cordova prepare;
cordova run ios;

Quick Start Example Code

Step 1: Create a banner with single line of javascript

// it will display smart banner at top center, using the default options
if(iAd) iAd.createBanner( { autoShow:true } );

Or, show the banner Ad in some other way:

// or, show a default banner at bottom
if(iAd) iAd.createBanner( {
	position:iAd.AD_POSITION.BOTTOM_CENTER, 
	autoShow:true
} );

Step 2: Prepare an interstitial, and show it when needed

// preppare and load ad resource in background, e.g. at begining of game level
if(iAd) iAd.prepareInterstitial( { autoShow:false } );

// show the interstitial later, e.g. at end of game level
if(iAd) iAd.showInterstitial();

Javascript API Overview

Methods:

// set default value for other methods
setOptions(options, success, fail);
// for banner
createBanner(options, success, fail);
removeBanner();
showBanner(position);
showBannerAtXY(x, y);
hideBanner();
// for interstitial
prepareInterstitial(options, success, fail);
showInterstitial();

Detailed Documentation

The APIs, Events and Options are detailed documented.

Read the detailed API Reference Documentation English.

FAQ

If encounter problem when using the plugin, please read the FAQ first.

Full Example Code

This MobFox Plugin Pro offers the most flexibility and many options.

Check the [test/index.html] (https://github.com/floatinghotpot/cordova-iad-pro/blob/master/test/index.html).

Screenshots

iPhone Portrait iPhone Landscape
ScreenShot ScreenShot
iPad Banner iPad Interstitial
ScreenShot ScreenShot

Ad PluginPro series for the world leading Mobile Ad services:

More Cordova/PhoneGap plugins by Raymond Xie, find them in plugin registry.

If use in commercial project or need prompt support, please buy a license, you will be served with high priority.

Project outsourcing and consulting service is also available. Please contact us if you have the business needs.

cordova-iad-pro's People

Contributors

floatinghotpot avatar leecrossley avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

cordova-iad-pro's Issues

Webview not pushed up iOS 7.01

This plugin works great on iOS 7.1+, however on version 7.01, the webview is not pushed up when the ad is shown, so the ad overlaps view. The same happens with admob-pro. Is this a known issue?

iAd Video ads

Do you plan to implement iAd Video ads? (prerolls not interstitial)
I am trying to show a pre-roll video before my content without users having to interact with the ad (ex. close it)

IDFA

I'm getting a "Your app is using the Advertising Identifier (IDFA)" rejection from the iOS app store... is anyone else getting this with this plugin? I've removed google analytics as I read elsewhere that could be the problem but still no joy. Thanks.

After reinstalling plugin, error building cordova

When building Cordova i have this error

Undefined symbols for architecture i386:
  "_OBJC_CLASS_$_GenericAdPlugin", referenced from:
      _OBJC_CLASS_$_iAdPlugin in iAdPlugin.o
  "_OBJC_METACLASS_$_GenericAdPlugin", referenced from:
      _OBJC_METACLASS_$_iAdPlugin in iAdPlugin.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Cordova cli 5.0.0

Installed plugins

com.darktalker.cordova.screenshot 0.1.1 "Screenshot"
com.google.cordova.admob 2.7.7 "AdMob Plugin Pro"
com.google.playservices 19.0.0 "Google Play Services for Android"
com.rjfun.cordova.extension 1.1.4 "Cordova Plugin Extension"
com.rjfun.cordova.iad 2.0.4 "iAd PluginPro"
cordova-plugin-geolocation 1.0.0 "Geolocation"
cordova-plugin-whitelist 1.0.1-dev "Whitelist"
nl.x-services.plugins.socialsharing 4.3.18 "SocialSharing"
org.apache.cordova.camera 0.3.6 "Camera"
org.apache.cordova.network-information 0.2.15 "Network Information"
org.apache.cordova.statusbar 0.1.10 "StatusBar"

Xcode build error due to missing bitcode

Google has added bitcode support to AdMob for IOS. However, the mediation adapter (cordova-plugin-admob-pro-iad) does not yet support bitcode. Here is the Xcode build error...

ld: '/Users/jmelvin/dev/sizzlescene/repos/mobile/platforms/ios/SizzleScene/Plugins/cordova-plugin-admob-iad/libAdapterIAd.a(GADMAdapterIAdInterstitial.o)' does not contain bitcode. You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE), obtain an updated library from the vendor, or disable bitcode for this target. for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Until this is resolved, the options appear to be

  • disable bitcode in Xcode build settings
  • discontinue using the iAD mediation adapter

iAd.showBannerAtXY not working - banner always shows in BOTTOM_CENTER

Hi,

I am testing with ios 9.2, iphone 6 simulator.

with the given test page, in "show at XY" section, no matter what I input, the ad banner is always shown in the BOTTOM_CENTER.
I have tried these combination: (0,0), (0,20), (0,-20), (20,0), (-20,0), (20,20)

what test value should I use?

regards,

iPhone interstitials

Apple has added support for iPhone interstitials for a while, so there's no need to limit to ipad anymore

Empty iad banner

Hello,
Thank you for your plugin. I have problem with it. It works well on simulator, i see the default banner of iad. But when i install my app from Apple Store. The iad banner is empty (see attach file). Note that my app is reviewed by iad network. Could you explain me how can i fix it to receive iad banner from iad Network ?
Thank you in advance,
Best regards,

screen shot 2015-11-10 at 3 51 26 pm

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.