Google Analytics Library IOS

前端 未结 11 1780
后悔当初
后悔当初 2021-02-12 17:44

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:24

    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:27

    Add -lGoogleAnalyticsServices in Build settings -> Other Linker Flags

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

    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:30

    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)
  • 2021-02-12 18:32

    Had similar issue after migrating to SDK 2.0 beta 4. Resolved by removing old GA library path from My Build Settings > Library Search Paths as pointed by Adri.

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