I'm making an app in Xcode using Swift and the build fails even though there seem to be no errors in the code. I do, however, get this error:
Compiler error Dictionary <>key, value <> is not convertible to hashable.
NSDictionary key must conform to the
NSCopying protocol. If the key is a custom object add the code to make it conform.
All of a dictionary's keys must be compatible with its key type (Key).
The key type of a dictionary must conform to the Swift standard library Hashable protocol.
From Coding Explorer BLog:
The built in Swift types like Int, Double, and String are hashable.