I have built my App (targeted for iOS7) and now want to apply Google Analytics as the last step before submission. What I did:
- Downloaded GA for iOS 3.01
- Imported content of
/GoogleAnalytics/Library/
into group "GoogleAnalytics"
- Imported
libGoogleAnalyticsServices.a
into group "GoogleAnalytics"
- Added Build Phases and swapped build phase
libGoogleAnalytics_debug.a
with libGoogleAnalyticsServices.a
- Added code block
#include "GAI.h"
to my -Prefix.pch
-file.
- Initialize the
[GAI sharedInstance]
in my AppDelegate
.
I have attached screenshots of the setup in the bottom of this post.
When I try to build (either device or simulator, both 32bit), 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 do I solve this?
UPDATE 1
I also get the 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 64bit. I had accidentally set "Build Only for active architectures" to NO, when this changed to YES, I was able to build yet again. This means that the App now does NOT work on iPhone 5S - which is still a problem.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…