Implement Google Analytics in ios swift

前端 未结 5 753
半阙折子戏
半阙折子戏 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:25

    For swift 3:

        var configureError:NSError? = nil
        GGLContext.sharedInstance().configureWithError(&configureError)
        assert(configureError == nil, "Error configuring Google services: \(configureError)")
        let gai = GAI.sharedInstance()
        gai?.trackUncaughtExceptions = true
        gai?.logger.logLevel = GAILogLevel.verbose
    

提交回复
热议问题