Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot convert value of type NSMutableDictionary? to expected argument type [NSObject: AnyObject]!

Tags:

i wanted to jump over to use Xcode 8 beta and convert my code, but I'm facing some kind of problem here, i am using Google Analytics SDK to send events,and this is how i used to use it in Swift 2.2 :

    let tracker = GAI.sharedInstance().defaultTracker
    tracker?.set(kGAIScreenName, value: "ViewController")
    let builder = GAIDictionaryBuilder.createScreenView()
    tracker?.send(builder?.build() as [NSObject:AnyObject])

But now i want to use Swift 3, its telling me :

Cannot convert value of type NSMutableDicationary to type [NSObject : AnyObject] in coercion.