I am using custom implementation of Hashable protocol on my classes using fairly primitive logic using Hasher.combine() on several String/Int based fields.
Everything seems to be working really well on Linux, macOS, and iOS 10, 11, 12, 13, 14.
On iOS 9 with the app compiled using Xcode 11.5 however I started receiving lot of random crashes where an object used as a key in a Set or Dictionary is not there, swift crashes with Set or Dictionary containing duplicate keys, etc.
It all points toward some kind of issue where for my objects during the app run Hasher.combine() is called multiple times for the same object with different random seed, thus generating different hashValue for the same object during the same app run.
To indicate, here is the precondition on line 5 that fails:
I don't know your use case but there's probably no reason to support iOS 9 (for anything). iOS updates are free. There are some devices that can't go beyond iOS 9 but probably not many are still in use. Apple recommends only supporting iOS versions two back from the current newest released version, which is iOS 13 currently and will be iOS 14 in a month or so.
This is a general problem that has existed for a decade or more. It's hard to write new code that supports old iOS versions. It's difficult or impossible to buy devices that have old iOS versions on them. If you discover bugs you may find old online discussions of how to work around them. If you are the new discoverer of an old bug then you're on your own. And there won't be much online interest in helping you figure it out either.