DesignBoost

How to Integrate the InMobi Ad Network into Your iPhone App

Integrating InMobi in an iPhone app was really easy. Just follow these simple steps.

Step 1 : Account Registration

Start by creating a new InMobi account at the following URL: https://www.inmobi.com/app/registration.html. You can then login and then select the Publisher section using the link at the bottom left in the following screen shot.

Step 2 : App Registration

From there you can register your app by selecting MySites/Apps and then iPhone App from the drop down menu. Just fill up the information by providing your app bundle ID and App Store URL.

Click ‘Continue’ to retrieve your InMobi App ID. You most use this App ID later in your integration of the app.

Step 3 : SDK Download

You can then download the iOS SDK from Publisher Area. Just select ‘iOS SDK’ from the Downloads section on the left.

The InMobi iOS SDK contains the code required to integrate InMobi ads within you iOS application . Carefully read the iOS SDK integration guidelines before your start the integration.

Step 4 : Add InMobi SDK files to project

Add the the following files from the SDK Bundle to your project:

• InMobiAdDelegate.h

• InMobiAdView.h

• InMobiEnumTypes.h

  • libInMobi_iOS.a

Step 5 : Add Required iOS Frameworks

You need to add CoreGraphics, CoreLocation and QuartzCore frameworks to your projects as well as UIKit and Foundation frameworks.

Step 6 – Declare InMobiAdDelegate and InMobiAdView instance

Import InMobiAdDelegate.h, InMobiAdView.h and InMobiEnumTypes.h in your UIViewController derivate class .h file. Declare InMobiAdDelegate protocol and an InMobiAdView instance.

Step 7 – AdView Instantiation and Protocol Methods Definition

Add the following code in your UIViewController derivate class (in our case we wanted the banner to appear at the bottom):

- (void)viewDidLoad {
[super viewDidLoad];
self.adView = [InMobiAdView requestAdUnit:INMOBI_AD_UNIT_320x48 withDelegate:self]];
[self.view addSubview:self.adView];
adView.center = CGPointMake(0, 480-48);
[self.adView loadNewAd];
}
- (NSString *)siteId;
{
return @"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";//this should be prefilled.
}
- (UIViewController *)rootViewControllerForAd;
{
return self;
}

replace the siteId by your own InMobi App ID found on the InMobi site.

Step 8 – Test the Integration

That’s it you will now see a nice banner at the bottom of your app which will hopefully generate tons of ads revenues…

 


Get these blog posts sent to your email.

DON’T WORRY, WE DON’T EAT OR EMAIL SPAM


Discussion

4 Comments / Leave a comment
  1. Dude, this was just superb! Everything has been explained with such simplicity and clarity!
    I was wondering if you could provide similar assistance for Android.
    I am trying to integrate an android app with inmobi and not able to receive ads.
    Could you please help me out

  2. Hi Veena, Jen,

    I represent InMobi Business Ops team. Please contact us at helpdesk@inmobi.com and we’ll be happy to help you integrated with InMobi.

    Bob: Apologies if this comment is not acceptable to you. If so, please feel free to delete. We just want to help your users integrate with our network

    Thanks

Leave a Comment

*

Check out these related posts:

read more ►

Using “The Validation Board” for Mobile App Developers

Think your app idea has what it takes to be the next Instagram? Think again. As of January 2013 there were 775,000 apps in the iOS app store, yet nearly 60% of developers report they never broke even on their development costs. Even worse, almost 70% report their most successful app never made more than $5,000. […]

read more >
read more ►

[Discussion] What Will Facebook Home Mean for The Future of iOS Design?

“What would it feel like if our phones were designed around people, not apps?” – Mark Zuckerburg on Facebook Home   You may have heard the news already, the “Facebook Home” is being released today. Technically, Facebook Home isn’t really an OS. It’s also not a “fork” of Google’s Android software. It’s an App layer […]

read more >
read more ►

“I have a good idea for an app…”

You can’t stop thinking about  how awesome your new app idea is, can you? If you could just get this thing out of your head and into people’s hands, you could change the world. But what’s the process to take a good idea for an app to a five star feature at the top of […]

read more >
Close
Get a Free Design Course
Learn to design a custom iPhone app interface in only 30 minutes.
[subscribe]