Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google AdMob iPhone5C iPhone5S 64bit Simulator issue

Tags:

ios

64-bit

admob

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?

like image 262
Blasco73 Avatar asked Nov 11 '22 18:11

Blasco73


1 Answers

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)

like image 129
user1248465 Avatar answered Nov 27 '22 04:11

user1248465