Implement Google Analytics in ios swift

前端 未结 5 757
半阙折子戏
半阙折子戏 2021-02-02 00:53

I am following the Analytics for iOS (developers.google.com/analytics/devguides/collection/ios/v3/?ver=swift) guide and I\'ve got errors in my Swift code Project that I can\'t f

5条回答
  •  余生分开走
    2021-02-02 01:39

    I think it's better to send error to crashlytics, but continue executing an app:

    func configureGoogleAnalytics() {
        var configureError: NSError? = nil
        GGLContext.sharedInstance().configureWithError(&configureError)
        if configureError != nil {
            Crashlytics.sharedInstance().recordError(configureError!)
        }
    }
    

    Also check this answer for newest way to add analytics.

提交回复
热议问题