Integrate Ads in IOS application tutorial
To display ads in mobile applications need to add ad library to app, 20150801 is the current
version of Keymob library , you will find ios project files and directories in the folder you downloaded, the following resources are Keymob library
related. Download IOS lib
you need add libs in plugins to project ,not need other file from ad platform.
Using advertising management library need the following a few steps
- README.md keymob quickly integrate document in English
- README_ios_zh.md keymob quickly integrate document in Chinese
- KeymobAd.framework keymob core library
- plugins platform SDK library supported by
- Right-click the xcode project, open the properties, select "add files to the project" menu, add
keymobsdk directory to the xcode project
- Add -fore_load item in Other Linker Flags . For example, using the admob and inmobi need to add the following items.
"$(SRCROOT)/keymobsdk/plugins/" is the keymob library path.
Note: if you don't add - force_load will not see third-party ads, log message "the platform not support"
1.Import keymob header files
Initialization Keymob library management is the prerequisite to call other advertising functions, the following initialization method is to use the Keymob.com service
[[AdManager sharedInstance] setController: self andListener: [[AdListener alloc] init]];
[[AdManager sharedInstance] configWithKeymobService: @ "1" isTesting: YES];
- "self" the first parameter is advertising context, not nil
- "AdListener" the second parameter is the delegate handler ad event implementing IAdEventListener protocol,
if you don't plan to deal with advertising events can set it nil
- "1" is Keymob application ID got from Keymob.com
- "YES" the second parameter is the test mode switch, set to YES when debugging, set to NO when release.
3. display advertising
Shown below the banner ads in the absolute position (0,200) sample
[[AdManager sharedInstance] showBannerABS:BANNER_SIZE_BANNER atX:0 atY:200];
- BANNER_SIZE_BANNER the first parameter is AD sizes, all the supported banners sizes are constants named
- "0" the second parameter is the location of the advertising x
- "200" the third parameter is the location of the advertising y
More tutorial of add ad in app qq group 310513042 home