How to make iAds work on a 3.0 + iPhone-iPad app?

狂风中的少年 提交于 2019-12-02 10:32:57

The AdLib Framework and iAds are only available in iOS > 4.0. For example, see the docs for ADBannerView:

Availability Available in iOS 4.0 and later.

If you are trying to build the app on an older version of the sdk (not just run the binary on a older device) and are getting errors when you try to import the headers like your question suggests, you could try wrapping the imports that fail in a #ifdef directive that tests for the availability macros from Availability.h, something like:

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