Wednesday, August 27, 2014

AdMob Banners in your Application

How to Add an AdMob Banners in your Application


Step-1: Before you add an admob banner you need to create an account in site. Then login by this account and click on the Monetize link. After then click on “Add your app manually” and fill up like bellow image



Then "Select ad format and name ad unit[in second step]" like bellow After then "View setup instructions[in third]" option click on the "Google abmob SDK" and download for iOS
                                                                                 
             

Step-2: In this step you need to unzip the downloaded file and add all files[without Add-ons folder] on your "Supporting files" folder in Xcode project.
                                  
                        Figure: Select all file for add                       Figure: Add all files on project

Step-3: In this step you need to add the following frameworks into your project in "Build Phases".
 AdSupport , AudioToolbox , AVFoundation , CoreGraphics , CoreTelephony , MessageUI , StoreKit , SystemConfiguration .     
                                             

Step-4: In this step you need to add -ObjC  in the Other Linker Flags under "Build Settings" like bellow


Step-5: Now you need to add following codes in your project

In ViewController.h add bellow 

#import <UIKit/UIKit.h>
#import "GADBannerView.h"

@interface ViewController : UIViewController {
  
    GADBannerView *bannerView_;
}

@end

In ViewController.m add bellow code in the  - (void)viewDidLoad  function

- (void)viewDidLoad
{
    [super viewDidLoad];
   // Do any additional setup after loading the view, typically from a nib.
    bannerView_ =[[GADBannerView alloc]initWithFrame:CGRectMake(0, 20, 320, 50)];
    bannerView_.adUnitID = @"ca-app-pub-Your adunitID"; // get from apps.admob.com site
    bannerView_.rootViewController = self;
    [self.view addSubview:bannerView_];
    [bannerView_ loadRequest:[GADRequest request]];
}


[Then Run and enjoy your Ad banner. Last updated: 27-08-2014]



Wednesday, August 13, 2014

Testing Your App on iOS Device

To create a developers certificate:

Step-1   Go to Apple Developer Link and then click on the  iOS Dev Center which is in bellow of this page.

Step-2   Then click on the sign in option and the login using your developer "Apple ID" and "Password"


Step-3   
Click the link under Certificates, Identifiers & Profiles


Step-4   Click Certificates, then click the plus sign(+) button near the top right corner.

Fig. Select the Certificate                                               
                                                                                 Fig. Click the Development option
                                                 
Fig. Click the plus sign (+)

Step-5   Select iOS App Development, click the Worldwide Developer Relations Certificate Authority link to download the WWDR certificate, then click Continue .


Step-6   Follow the directions to create a Certificate Signing Request (CSR). Click Continue .

Step-7   Upload your CSR and click Generate.

Step-8   If you are the Team Agent, you will be returned to the Certificates page with the status listed as Pending. Wait a moment then refresh the page in your browser. You should get a Download link at that point. If you are a developer on the team, the Team Agent will receive notification to approve or reject your request. When he or she approves your request, continue with the steps that follow.

Step-9   Download the development certificate (.cer) file to your computer.

Step-10   Double-click the file to install it to your keychain.

[N.B. Last update: 13-08-2014]