Paramasivan Samuttiram
Paramasivan Samuttiram

Reputation: 3738

MRAID Compliance

I created an Ad Publisher iOS SDK, which will show bottom banner ad. It is created using native components of iOS, like UIView, UIImageView, UIButton, etc. I would like to make it MRAID compliance. If i created Ad using HTML5 and loaded it into an UIWebView, i can inject mraid.js into the UIWebView and trigger functions like ad loaded, expanded, etc using

  "stringByEvaluatingJavaScriptFromString"

But i created the banner ad using Native components. So how can i make the ad MRAID compliance?

Please advice, Thank you.

Upvotes: 1

Views: 1274

Answers (3)

neaumusic
neaumusic

Reputation: 10464

the banner would be JS/CSS/HTML if you're using the MRAID spec

MRAID is a spec by iab, similar to how w3c specs out HTML/CSS/JS

to be MRAID "compliant", you need to implement all JS hooks for controlling the device

the MRAID spec is an API for JS to control the native device, not a native API for invoking JavaScript

Upvotes: 0

Thomas
Thomas

Reputation: 550

You should indeed create a UIWebView in which you load the ad. Please note though that an MRaid ad can ask a lot of the device that's displaying it. So you would need to create the js to ios bridge yourself in order to have a fully compatible MRaid environment.

Have a look at the standards document to see what's involved:

http://www.iab.net/media/file/IAB_MRAID_v2_FINAL.pdf

Upvotes: 1

user149341
user149341

Reputation:

You can't get there from here. MRAID advertisements are built out of HTML and Javascript, not native iOS components.

Upvotes: 3

Related Questions