2010-11-11 152 views
1

我很难找出这个问题。我的应用程序启用了iAds,它可以在iPhone(设备)和iPhone(模拟器)4.1上运行。我知道3.2版本(iPad)不支持广告。所以,我做了一个到iad库的薄弱环节。在编译选项=>链接=>其他链接标签我写了iAd。在此之后,我收到了生成错误:iPhone模拟器在iPad上构建错误,并在iPhone模拟器和iPhone设备上正常工作

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 

回答

2

你在运行时检查IAD设备库的存在,你给他们打电话之前,包括加载与NIB和iAd的横幅广告吗?你需要绕过iPad上的iAd东西。

+0

我必须这样做吗?我认为弱链接会照顾到这个问题。 – azamsharp 2010-11-11 20:19:25

+0

我添加了条件,现在它的工作原理!谢啦! – azamsharp 2010-11-11 20:23:53

相关问题