We have a generated Fragment
subclass that has an optional String property generated as such:
var name: String? {
get { __data["name"] }
set { __data["name"] = newValue }
}
It crashes on the get
accessor which calls the generic subscript accessor on Apollo’s DataDict
which force casts to the type (String?
), but an underlying nil
value causes a crash on iOS 14. It seems to work fine on later versions of iOS.
The crash reports the error is Could not cast value of type 'Swift.AnyHashable' to 'Swift.String'
Any idea how we could avoid this crashing? We don’t really want to have to drop support for iOS 14.
TIA!