1

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.

Divyu
  • 1,325
  • 9
  • 21
Paramasivan Samuttiram
  • 3,728
  • 1
  • 24
  • 28

3 Answers3

3

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

1

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

Thomas
  • 550
  • 3
  • 11
0

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

neaumusic
  • 10,027
  • 9
  • 55
  • 83