Like I mentioned last time I’ve been hacking around with some richer creative styles on mobile. Nothing that should be all that amazing, but I’ve been finding the existing tools and techniques a bit rough. To do some of the base testing I started out with compiling the test programs on iOS and Android that MoPub provides in their open source SDK.
Those are awesome tools to have, but it’s pretty difficult to get folks who work on web stuff to compile test applications for mobile. And what about all the SDKs that aren’t open sourced? Recompiling apps isn’t really an option for a lot of cases.
Instead I’ve been playing around with using a node.js based HTTP proxy to test out some of the other stuff. On iOS at least it’s really easy to set the HTTP proxy for a wifi connection, and it applies to all apps. Then you just need a simple rule to swap the host and path to point to what you want to serve. I have a PHP script that works with MoPub in the MRAID testing repo I put up a little while ago. Then you just need a rule when you start hoxy to direct ad requests to your script instead:
request: if $host eq "ads.mopub.com", $host.set-to("test.com") $url.replace("/m/ad", "/serve_mraid.php")
Then instead of needing to use your test app just configure the device to point to the proxy. You can see the creative in any existing publisher property, which makes it really easy to do some screenshots for clients. And you don’t have to resort to hacky production config overrides.
Since this is running as a node.js service it’s pretty easy to just stick it on a public server. That way other folks in the office can use it, or you can even send it to people outside so they can interact with the ad instead of having to rely on screenshots. Plus it works for swapping in test creative for the cases where you don’t have access to the ad SDK code to try things out. I still need to fold some test harnesses for the other networks into the MRAID testing stuff, but that’s a project for another day.