Failed to associate GoogleAnalytics 3.01 with Xcode 5 (missing required x86_64 architecture)

I created my application (designed for iOS7) and now I want to use Google Analytics as the last step before submitting. What I've done:

  • Download GA for iOS 3.01
  • Imported content /GoogleAnalytics/Library/ into the GoogleAnalytics group
  • Imported libGoogleAnalyticsServices.a into the libGoogleAnalyticsServices.a group
  • Added Build Phases and changed the build phase of libGoogleAnalytics_debug.a using libGoogleAnalyticsServices.a
  • Added #include "GAI.h" code to my -Prefix.pch file.
  • Initialize [GAI sharedInstance] in my AppDelegate .

I have installation screenshots at the bottom of this post. When I try to build (either a device or a simulator, like 32-bit), I get the following linker errors:

 Undefined symbols for architecture x86_64: "_OBJC_CLASS_$_GAI", referenced from: objc-class-ref in FTVAppDelegate.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) 

How to solve this?

UPDATE 1

I also get a warning

 ld: warning: ignoring file .../libGoogleAnalyticsServices.a, missing required architecture x86_64 in file .../libGoogleAnalyticsServices.a (3 slices) ld: warning: ignoring file .../SDWebImage.framework/SDWebImage, missing required architecture x86_64 in file .../SDWebImage.framework/SDWebImage (3 slices) 

UPDATE 2

This error only occurs when building for 64 bits. I accidentally set Build Only for active architecture to NO, when it changed to YES, I was able to create again. This means that the application is now NOT working on the iPhone 5S - this is still a problem.

+46
ios cocoa-touch xcode google-analytics linker-errors
Sep 21 '13 at 14:56
source share
4 answers

You are not doing anything wrong. I am sure that Google has not yet provided a version of its libGoogleAnalyticsServices.a in arm64 format. This is very annoying ... It has been several weeks since the publication of Xcode 5GM.

At the moment, I assume that you create for armv7, armv7s or delete google analytics until they get out of their pants.

UDATE: Finally fixed https://developers.google.com/analytics/devguides/collection/ios/resources

+70
Sep 23 '13 at 7:34 on
source share

Select this option in the "Architecture" section in the "Build Settings" section, and your code will work on the iPhone 5S, I had the same problems.

Build settings

+13
Dec 25 '13 at 17:31
source share

Good news fixed by release 3.03:

Support for 64-bit versions is now available in version 3.0 of the Google Analytics SDK Services for iOS. ( Source )

+8
Jan 14 '14 at 21:33
source share

I see in the first screenshot that your project has 2 goals. Are you sure libGoogleAnalyticsServices.a has been added for both purposes? The bounds may differ from target to target, so this is the most common mistake this way ... Also try deleting GA from the project, then clean, then clean the build folder, then restart Xcode and add GA again =) Yesterday it helped me =)

0
Sep 21 '13 at 15:28
source share



All Articles