IOS linking with missing architecture i386 (AdSupport.framework)

半腔热情 提交于 2019-12-24 12:44:07

问题


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!


回答1:


Go to the Project Target.and make architecture like below image.




回答2:


/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



来源:https://stackoverflow.com/questions/26712532/ios-linking-with-missing-architecture-i386-adsupport-framework

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