Jack Robson Jack Robson - 1 year ago 74
iOS Question

Cannot convert value of type '(TVSessionConfigurationBuilder!) -> Void' to expected argument type 'TVSessionConfigurationBuilderBlock!'

Just followed the iOS TeamViewer SDK tutorial but it won't work for me using Swift.

let sessionConfiguration : TVSessionConfiguration = TVSessionConfiguration.tvSessionConfigurationWithBlock(
(builder: TVSessionConfigurationBuilder!) -> Void in
builder.sessionCode = "SESSION_CODE"

Gives the error in the title.

Any suggestions?

Answer Source

Try this instead:

let sessionConfiguration = TVSessionConfiguration(block: { builder in
    builder!.sessionCode = "SESSION_CODE"            
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download