简体   繁体   中英

IOS linking with missing architecture i386 (AdSupport.framework)

I had this question going on, but now I am a little further:

I added this framework to my project:

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/System/Library/Frameworks/AdSupport.framework

Now this works fine if I run the app on any device, however this framework is just for the architectures armv7, armv7s and arm64

When running the app on the simulator, the build fails because the architecture i386 is missing. This is included in:

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/AdSupport.framework

How can I achieve that all architectures can be used? I played a lot with the build-settings but nothing worked so far!

error report:

ld: warning: ignoring file /Users/XXXXXXX/Documents/app1/app1/AdSupport.framework/AdSupport, missing required architecture i386 in file /Users/XXXXXXX/Documents/app1/app1/AdSupport.framework/AdSupport (3 slices)
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_ASIdentifierManager", referenced from:
  objc-class-ref in libGoogleAdMobAds.a(GADDevice.o)
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Thanks a lot!

Go to the Project Target.and make architecture like below image. 在此处输入图片说明

/Users/XXXXXXX/Documents/app1/app1/AdSupport.framework/AdSupport is missing an i386 slice; I suspect that it was likely built for arm and not intel. It looks like that framework is external to your project, so I suggest you rebuild it for the simulator.

You can check the current architectures of the framework by running file /Users/XXXXXXX/Documents/app1/app1/AdSupport.framework/AdSupport

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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