《iPhone开发加入苹果广告(iAd)(1).ppt》由会员分享,可在线阅读,更多相关《iPhone开发加入苹果广告(iAd)(1).ppt(26页珍藏版)》请在三一办公上搜索。
1、Integrating iAds,By Jesse Collis Melbourne Cocoaheads,November 2010,About me,iAd Topics,iAd Framework OverviewIntegrating iAds+DEMOiAd technical caveatseCPM and CTRiAd case study,iAd Framework,Introduced in iOS 4.0 for iPhoneComing to iPad in iOS 4.2(Friday?)Easy to implementWill roll out worldwide
2、soon,Integrating iAds,Weak Link iAds,Inside a UIViewController.h,#import interface adSupportedViewController:UIViewController/iVars go here/property is optionalproperty(nonatomic,retain)ADBannerView*adView;,If youve weak linked the iAd Library,this wont cause problems,Runtime check for iAds,if(NSCla
3、ssFromString(ADBannerView)/Setup AdViewadView=ADBannerView alloc initWithFrame.,Implement ADBannerViewDelegate,/Apple sent you an ad!Display the ADBannerView from here-(void)bannerViewDidLoadAd:(ADBannerView*)banner;/Someone has tapped on an ad($)-(BOOL)bannerViewActionShouldBegin:(ADBannerView*)ban
4、ner willLeaveApplication:(BOOL)willLeave;/AdBannerView has finished-(void)bannerViewActionDidFinish:(ADBannerView*)banner;/*sigh*The most common message.Hide the ADBannerView-(void)bannerView:(ADBannerView*)banner didFailToReceiveAdWithError:(NSError*)error;,End ResultAfter you receive a test ad,Ena
5、ble iAds in ITC,DEMOJCAdSupportedNavController,Demo is available on GitHub,https:/planned for additional ad networks.,Technical Caveats 1,ADBannerView is a black boxADBannerView must be displayed in a UIViewController subclassHide ADBannerView when theres no adSometimes test ads dont display,sometim
6、es they do.,Technical Caveats 2,Apple decides when to serve you ads Apple doesnt care if you arent being served adsHow you handle ADBannerView via its delegate can determine the ads you get,ADBannerViewDelegate Documentation:“preventing ads displaying may alter the advertisements your application se
7、es and reduce the revenue your application earns through iAd.”,Fill Rate%and CTR%,FIll RatePercentage of total requests supplied with AdsCTR=Click Through RatePercentage of people who click on an add,eCPM,Effective Cost Per 1000(M)ImpressionsIncludes clicks too?,Image Source:Google AdSese Blog,iAd S
8、upported since Oct 21,201011,000 upgrades to date 400 app launches per day,Case StudySeoul City Metro Lite,User Demographics,iOS Versions,79%=iOS 4.019%=iOS 3.12%=iOS 3.2.x,iAd Performance,Overall Performance(since 21 October),Rumoured world wide roll out test,Why so rubbish?,My top 3 countries,Where the iAds are released,What else can you do?,Integrate additional platforms;ADMob etc.Sell apps for moneyWait patiently for Apple,More Info on iAd,Apple Forumshttps:/Development Guidehttp:/,Thanks,Sample codehttps:/Multimedia Websitehttp:/.auContact Jesse C.au,