I have a "get hash of string by String.hashValue" code, that I added it below. This code worked well in Xcode 9.4.1.
Worked well means that whenever I close app and re-open it, the result of hashValue is same (unique)
private func cacheName(of url: String) -> String {
// The url is url of a png image, for example www.imageurl.com/image.png
return "\(url.hashValue)"
}
When I build my Project in Xcode 10 the result changes everytime I restart the app (close and open app again). The version of iOS, device, Swift version is same. So I think the problem is Xcode 10 has change something that effect to the hashValue (maybe configure when build app ??)
If I use the String.hash instead of, it works well. But in the previous version, I saved the hashValue result, so I don't want to change it.
How can I keep the result of String.hashValue unique in every time. Or any suggestion would be appreciated