Google Analytics Library IOS

前端 未结 11 1639
逝去的感伤
逝去的感伤 2021-02-12 17:39

When i add google analytics library, i have this warning

Undefined symbols for architecture armv7:
  \"_OBJC_CLASS_$_NSAttributeDescription\", referenced from:
          


        
相关标签:
11条回答
  • 2021-02-12 18:06

    I followed all suggestions and I was still getting an error on XCODE 5.1.1.

    For me the error was in target > Build Setting > Architecture > Architectures.

    I replaced the value with ARCHS_STANDARD_32_BIT and the error was gone.

    Maybe the libGoogleAnalytics lib was not compiled for 64 BIT architecture.

    Hope this will help someone. Or get latest lib which is compiled for 64 Bit.

    0 讨论(0)
  • 2021-02-12 18:06

    I had an ODD odd issue. For some reason libGoogleAnalytics.a was in Copy Bundle Resources when it was supposed to be in Link Binary With Libraries

    Hopefully that helps someone.

    0 讨论(0)
  • 2021-02-12 18:11

    I had similar errors as above, actually more (SDK 2.0 beta 4). After adding the Analytics library/headers, linking with these two frameworks solved the issues:

    CoreData.framework and SystemConfiguration.framework

    0 讨论(0)
  • 2021-02-12 18:12

    Add -lGoogleAnalyticsServices in Build settings -> Other Linker Flags

    0 讨论(0)
  • 2021-02-12 18:13

    I followed this tutorial. It says to add

    #import "GAI.h"
    #import "GAIFields.h"
    

    into the NameofTheProject-Prefix.pch file.

    And additionally to CoreData.framework and SystemConfiguration.framework add libz.dylib It solved all issues.

    0 讨论(0)
  • 2021-02-12 18:13

    If using Cocoapods make sure Other linker flags has only $(inherited) flag and remove any child architecture flags.

    For framework search paths and Library search paths also set only $(inherited) flag.

    Inside the header bridging file put the #import <Google/Analytics.h>

    0 讨论(0)
提交回复
热议问题