简体   繁体   English

兼容性问题iAd Banner?

[英]Compatibility problem iAd Banner?

嗨,我在测试aap中使用了iAd Banner。它可以在4.0 SDK上正常运行,但是当我使用SDK 3.0或更低版本时,它崩溃了,但没有显示任何内容。我读到弱链接会帮助我解决这个问题,但是按照我的想法,它会崩溃当它找不到框架时。我什至不知道如何使用弱链接。请帮助我解决此问题。

When allocating your ADBannerView, first check to see if the OS version supports it: 分配ADBannerView时,首先检查操作系统版本是否支持它:

if(NSClassFromString(@"AdBannerView")) {
     //Allocate ADBannerView here
}

Then in the build settings of your target, add -weak_framework iAd to Other Linker Flags in the Linking section. 然后,在目标的构建设置中,将-weak_framework iAd添加到“ 链接”部分中的“ 其他链接器标志 ”。

Edited as per Jonathans recommendation. 根据乔纳森斯的建议进行编辑。

Expand the Targets directory, right click , and choose “Get Info”. 展开Targets目录,右键单击,然后选择“获取信息”。 Click the Build tab, make sure “All Configurations” is selected, and navigate to Linking\\Other Linker Flags. 单击“构建”选项卡,确保已选择“所有配置”,然后导航到“链接\\其他链接器标志”。 Double click on that entry, click the “+” button, and type “-weak_framework iAd”. 双击该条目,单击“ +”按钮,然后键入“ -weak_framework iAd”。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM