Swift 4 toRaw() update?

Viewed 307

I'm following a tutorial where I'm suposed to be able to write:

func session(_ session: MCSession, peer peerID: MCPeerID, didChange state: MCSessionState)
{
    let UserInfo = ["peerID":peerID,"state":state.toRaw()]

}

Maybe I'm supposed to write RawValue? Has there been an update because the videos I'm following is 2 years old.

Best regards,

Simon

1 Answers

The toRaw() method has been deprecated and replaced by rawValue.

Related