0 Replies
      Latest reply on Oct 9, 2019 9:35 PM by shenberg
      shenberg Level 1 Level 1 (0 points)

        This returns false:


        INStringResolutionResult.success(with: "") == INStringResolutionResult.success(with: "")


        There are also no properties exposed on this class that would allow me to create an easy way to compare it.


        I've been able to compare them by using their object descriptions, dropping the actual object information (name/address) like so:


        func getDesc(res: INStringResolutionResult) -> String {
            let desc = res.description
            let index = desc.index(desc.startIndex, offsetBy: 43)
            return String(desc.suffix(from: index))
        assert(getDesc(res: .success(with: "")) == getDesc(res: .success(with: ""))) // Returns true


        But it itsn't very pretty. Anyone know of a better way to do this?