Google Analytics doesn't work on new iOS project

后端 未结 3 1816
北荒
北荒 2021-01-07 18:48

I have created a new iOS project and added Google Analytics support following by official instructions.

I\'ve added to Frameworks:

libGoogleAnalytic         


        
相关标签:
3条回答
  • 2021-01-07 19:04

    Thanks for all! The following steps helped me:

    1. Remove CoreData.framework.
    2. Add again CoreData.framework.

    arm64 is now supported. Thanks to Amar.

    Now I should fix the last warning:

    ld: warning: directory not found for option '-L/Users/.../Sources/GoogleAnalytics'
    

    It happens because I work with the project on different users.

    0 讨论(0)
  • 2021-01-07 19:22

    From Google Analytics developer page

    The Google Analytics SDK uses the CoreData and SystemConfiguration frameworks, so you will need to add the following to your application target's linked libraries:

    • libGoogleAnalyticsServices.a
    • AdSupport.framework
    • CoreData.framework
    • SystemConfiguration.framework
    • libz.dylib

    Looks like you are missing out CoreData.framework.


    Running the lipo -info command on the GA library.

    xcrun -sdk iphoneos lipo -info libGoogleAnalyticsServices.a
    

    Gives result,

    Architectures in the fat file: libGoogleAnalyticsServices.a are: armv7 armv7s i386 x86_64 arm64 
    

    So it does support arm64.

    Hope that helps!

    0 讨论(0)
  • 2021-01-07 19:22

    You should add the libsqlite3.0.dylibfile to your frameworks.

    To do this, under the projects target, on the general tab, you will find "Linked Frameworks and Libraries", just select the '+' button, and add the framework from there

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