Adding a Google AdMob(6.2.1) to Your Application

Introduction

The Google AdMob Ads SDK allows developers to easily incorporate mobile-friendly text and image banners as well as rich, full-screen web apps known as interstitials. An ever-growing set of "calls-to-action" are supported in response to user touch including direct access to the App Store, Android Market and Windows Phone 7 Marketplace, iTunes, maps, video and the dialer. Ads can be targeted by location and demographic data. The Google AdMob Ads SDK can be used by the following publishers:

AdMob publishers
Access the Google AdMob network to easily monetize your application.
DoubleClick For Publishers (DFP) users
Leverage DFP to traffic, target and serve directly-sold ads. For upgraded DFP ( www.google.com/dfp) users, select  Android or  iOS.
AdSense publishers
Monetize your search results pages with Google search ads.

Follow the instructions below to incorporate the Google AdMob Ads SDK into your development environment. To begin, select the tab corresponding to your particular platform.

Requirements

  • iOS version 4.3 or later
  • Xcode 4.5 or later

Warning: All new iPad and iPhone apps created after October 14, 2011 will require an AdMob SDK that was released on or after March 15, 2011. This corresponds to version 4.0.2+ for iOS. If you downloaded the library from our official download site, then you're already set. Otherwise you may have an old version of the AdMob SDK that was released prior to March 15, 2011, and your new app will not receive any ad impressions until you update your SDK.

Incorporating the SDK

For the rest of these instructions, the project shown will be named  BannerExample. When going through the exercises, simply replace  BannerExample with your project's name.

The decompressed SDK consists of Objective-C headers, a runtime library and a README.

1. Right-click on your project in Xcode, choose Add Files to "BannerExample"...

 

2. Add everything except the add-ons folder unless you need something from there. The add-ons folder includes headers for DFP and mediation, as well as the Analytics library. Even if you are adding these in, do not add any other Xcode projects into your project.

3. The SDK library references four iOS development frameworks which may not already be part of your project:

  • StoreKit
  • AudioToolbox
  • MessageUI
  • SystemConfiguration
  • CoreGraphics
  • AdSupport
To add these frameworks, double-click the  BannerExample project name. Open the  Link Binary With Libraries dropdown under the  Build Phases tab. Add the frameworks from the iOS SDK using the  + button that becomes visible.

4. You now need to add -ObjC to the Other Linker Flags of your application target's build setting:

  1. In Xcode's project navigator, press the blue top-level project icon.
  2. Click on your target, then the Build Settings tab.
  3. Under Other Linker Flags, add -ObjC to both Debug and Release.

You should now be able to rebuild your project without any errors.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值