我很难搞清楚这个问题。我的应用程序已启用iAds,它适用于iPhone(设备)和iPhone(模拟器)4.1。我知道版本3.2(iPad)不支持广告。所以,我做了一个弱的iad库链接。在构建选项中=> linked =>我写的其他链接标签iAd。在此之后我得到了一个构建错误:
Ld build/Debug-iphonesimulator/One2ThreePop.app/One2ThreePop normal i386
cd /Users/azamsharp/Documents/123Pop
setenv MACOSX_DEPLOYMENT_TARGET 10.6
setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 -arch i386 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk -L/Users/azamsharp/Documents/123Pop/build/Debug-iphonesimulator -F/Users/azamsharp/Documents/123Pop/build/Debug-iphonesimulator -filelist /Users/azamsharp/Documents/123Pop/build/One2ThreePop.build/Debug-iphonesimulator/One2ThreePop.build/Objects-normal/i386/One2ThreePop.LinkFileList -mmacosx-version-min=10.6 iAd -Xlinker -objc_abi_version -Xlinker 2 -framework CoreGraphics -framework Foundation -framework OpenGLES -framework QuartzCore -framework UIKit -framework AudioToolbox -framework OpenAL -lz -framework AVFoundation "-lcocos2d libraries" -weak_framework iAd -o /Users/azamsharp/Documents/123Pop/build/Debug-iphonesimulator/One2ThreePop.app/One2ThreePop
i686-apple-darwin10-gcc-4.2.1: iAd: No such file or directory
Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 failed with exit code 1
答案 0 :(得分:2)
在调用iAd库之前,是否在运行时检查是否存在iAd库,包括使用iAd横幅加载NIB?您需要绕过iPad上的iAd内容。