简体   繁体   中英

Google AdMob iPhone5C iPhone5S 64bit Simulator issue

During compilation of a project with target: iPhone Retina (4-inch 64bit) I have a problem with library:

OBJC_CLASS_$_GADBannerView

and I've thie error:

ld: warning: ignoring file /Users/myName/Downloads/GoogleAdMobAdsSdkiOS-6.5.1/libGoogleAdMobAds.a, missing required architecture x86_64 in file /Users/myName/Downloads/GoogleAdMobAdsSdkiOS-6.5.1/libGoogleAdMobAds.a (3 slices)

Seems that Google haven't implemented the 64bit version of his AdMob api?

You can check if a library is compiled for arm64 by running the "file" command in a terminal. Here is an example...

>>> file /path/to/lib/libGoogleAdMobAds.a

libGoogleAdMobAds.a: Mach-O universal binary with 5 architectures

libGoogleAdMobAds.a (for architecture armv7): current ar archive random library

libGoogleAdMobAds.a (for architecture armv7s): current ar archive random library

libGoogleAdMobAds.a (for architecture cputype (16777228) cpusubtype (0)): current ar archive random library

libGoogleAdMobAds.a (for architecture i386): current ar archive random library

libGoogleAdMobAds.a (for architecture x86_64): current ar archive random library

The latest version of libGoogleAdMobAds.a still doesn't have an arm64 slice, so you cannot (yet) compile your code for 64-bit.

As Blasco73 points out, to exclude 64-bit you need to do the following:

Project -> Build Settings -> Architectures and choose Standard artitectures (armv7, armv7s) - $(ARCHS_STANDARD)

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