ios - Issue with Google Analytics in Swift 2 or 3 -


i have problem swift 2 (swift 3) , google analytics.

this line problem:

tracker.send(gaidictionarybuilder.createscreenview().build()) 

xcode tell's me:

cannot invoke 'send' argument list of type '(nsmutabledictionary!)'

update swift 3 (2016.10.19)

let tracker = gai.sharedinstance().defaulttracker let build = (gaidictionarybuilder.createscreenview().build() nsdictionary) as! [anyhashable: any] tracker?.send(build) 

still ugly approach, let me know if there's cleaner conversion.


original

same here, struggling resolve tons of errors.

what did (deprecated):

var build = gaidictionarybuilder.createappview().build() [nsobject : anyobject] tracker.send(build) 

edit (2015)

thanks @george poulos. . updated options, createappview deprecated, should use createscreenview instead.

var build = gaidictionarybuilder.createscreenview().build() [nsobject : anyobject] tracker.send(build) 

Popular posts from this blog