I was folling this tutorial for Swift: https://www.raywenderlich.com/125311/make-game-like-candy-crush-spritekit-swift-part-1 and came across this code:
func
making the class an NSObject solved the equatable problems for me...
class Cookie: NSObject { ... }
(got the tip from the iOS apprentice tutorials)