After spending way too much time trying to implement my own solution that would rotate ads from different networks in my free applications I decided to go with pre-made solution called DTBannerManager. It was created by Oliver Drobnik (@Cocoanetics) and is available for purchase in his Parts Store. Now what this does is exactly what I wanted and more It will check for iAds, then AdMob and Mobfox if you want. It also does it with style as the new ads slide in smoothly. It works on both 3.x & 4.x versions of iOS and is even compatible with tab bar controllers. Just to put the cherry on top you can also offer your users the option to remove the ads completely through IAP.
Implementation in a native iOS app couldn’t be simpler . . .
[[DTBannerManager sharedManager] addAdsToViewController:tabBarController];
After further review and a little help from a friend we discovered the issue. The PhoneGap AppDelegate seems to create the webview then the view controller, then pushes the webview into the view controller which in turn calls webViewDidFinishLoad. This seems to be the key. We cannot access the viewController object until webViewDidFinishLoad has been called. Hence we instantiate DTBannerManager like so . . .
Now you think I’d be super stoked at this point right? Wrong. I discovered that upon clicking a Mobfox Ad the app would immediately crash. Turns out I left out the Other Linker Flags -ObjC & -all_load which are required for the Mobfox.framework. No problem, just add them right? Wrong. As soon as I did my builds were failing with a Duplicate symbol error on the file NSData+Base64.h. Apparently both the phonegap.framework & the Mobfox.framework both depend on NSData+Base64.
Turns out that only the Mobfox.framework actually depends on it. My simple phonegap app had no use for it. I posted to the PhoneGap Google Group and was re-leaved to find a simple solution. PhoneGap provides you everything necessary to compile your own custom version of the phonegap.framework. You can find the specifics in the FAQ #10. I just compiled a new copy of the framework minus the header file and any refrences to NSData+Base64.h. I deleted the pre-existing phonegap.framework from my project and imported my new custom framework and immediately the Duplicate symbol errors were gone and DTBannerManager was operating correctly – Mobfox ads and all.
This article is based off of PhoneGap for iOS version 1.0.0. You can download my custom phonegap.framework if you would also like to use DTBannerManager or Mobfox Ads in your phonegap project. I highly recommend DTBannerManager – it couldn’t be easier and besides it will increase your ad revenue! Get it and other great components from the Cocoanetics Parts-Store.
Those cool guys at iD Software have released the source code to the hugely popular DOOM Classic game for iPhone & iPodTouch. It has been released under the GPL License and can be downloaded from HERE. You’ll probably also want to read the Build Instructions.
For more information check out Development on Doom Classic By John Carmack, Technical Director, Id Software.
If you’re not an iPhone developer you can purchase the game from the AppStore
Play the legendary first person shooter, DOOM, with an iPhone or iPod Touch. Fight through 36 missions in four action-packed episodes: Knee-Deep in the Dead, Shores of Hell, Inferno, and Thy Flesh Consumed.
Experience DOOM multiplayer on your mobile device, including Deathmatch and Cooperative play for up to four players via wireless internet.
Choose from three different control types and customize the interface to suit your style.
Explore the depths of Mars while utilizing the topdown map to help you explore and save your game on the fly.
Listen to the original soundtrack or disable it and use your own iPod music.
Here’s a handy code if you would like to add a button to your app that allows users to click it and be taken directly to a search listing of ALL your apps on the iTunes App Store. (see below) This is alot handier than adding a button/link to each individual app
If you would like to launch the SMS app and send a predefined message use the code below
If you would like to add a button to your application and have it launch the Phone app to dial a pre-defined phone number use the code below.
This has got to be one of the top questions asked by new app developers. “How do I hide the UIStatus Bar?”
You can use the code snippet below or add UIStatusBarHidden to your info.Plist file, change it’s type to boolean and add a check mark to the box.