This is mentioned in the release notes of iOS 17: https://developer.apple.com/documentation/ios-ipados-release-notes/ios-ipados-17-release-notes
Case value is not stored properly for a string rawvalue enumeration. (108634193)
Workaround: Don’t use a rawvalue with a string enum property.
Post
Replies
Boosts
Views
Activity
How is it possible that something as simple as turning off automatic syncing, which is part of the API, is not working in the RC version of Xcode 15, come on Apple...
I have managed to get out the dictionary using reflection, guess this will do as a temporary workaround, but kind of strange that the api does not match the WWDC video or documentation.
For people running into the same thing, this works until the API is actually there (just do not use this in production):
extension History.Tombstone {
subscript<T>(keyPath: KeyPath<Model, T>) -> T {
let mirror = Mirror(reflecting: self)
guard
let storageChild = mirror.children.first(where: { $0.label == "storage" }),
let dictionary = storageChild.value as? [PartialKeyPath<Model> : Any],
let value = dictionary[keyPath] as? T
else {
fatalError("Missing expected tombstone value for \(keyPath)")
}
return value
}
}