How to work with iAds using xcode 3.1.3

无人久伴 提交于 2019-12-20 07:32:04

问题


Presently I am Working With Integrate iAds and make a lite version of the app. My Problem is Previously I am working with iAds is xcode 4.1.3 but Presently I was used xcode 3.1.3 iAds are not supporting what we do please help me.

 NSString *contentSize = UIInterfaceOrientationIsPortrait(self.interfaceOrientation) ? ADBannerContentSizeIdentifier320x50 : ADBannerContentSizeIdentifier480x32;

This line error: ADBannerContentSizeidentifier320x50'undeclared(first use in this function)


回答1:


First, even in the newest versions of iOS, ADBannerContentSizeidentifier320x50 is no longer the preferred constant. Use ADBannerContentSizeIdentifierPortrait instead.

But I think the real issue here is that Xcode 3.1.3 is too old to include the iAd framework. It was first included in iOS4 and so won't be there in anything older. Your choices therefore are:

  • Use a newer version of Xcode (and iOS)
  • Don't use iAds. There are other ad networks such as AdMob that still support older devices



回答2:


Upgrade your SDK to the latest version.

You need at least iOS 4.0 if you want to use iAd. And I think Xcode 3.1.3 only includes the iPhone OS 3.0 SDK.

Time to upgrade to Snow Leopard?



来源:https://stackoverflow.com/questions/6927209/how-to-work-with-iads-using-xcode-3-1-3

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!