You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SR-5220 Expose API to retrieve string representation of KeyPath
Issue Description:
Hi,
I've created a KVO wrapper in past that uses string based key path. Swift 4.0 introduces `KeyPath` class that provides a lot more type safety when working with key paths.
I can't seem to find any normal public API that exposes string keypath from KeyPath object.
Additional Detail from JIRA
md5: 9c156f0c4bf4914f863ddc77c53f9ce9
duplicates:
Issue Description:
Hi,
I've created a KVO wrapper in past that uses string based key path. Swift 4.0 introduces `KeyPath` class that provides a lot more type safety when working with key paths.
I can't seem to find any normal public API that exposes string keypath from KeyPath object.
The only API I could find is this `_kvcKeyPathString` weird looking property. It's underscored (so if I understand this correctly, even though it's public, it's intended for private use only) and doesn't contain any comments.
https://github.com/apple/swift/blob/main/stdlib/public/core/KeyPath.swift#L124
````
```
Can I count on `_kvcKeyPathString` being backwards compatible when using Swift 4.x versions?
Is `_kvcKeyPathString` guaranteed to always return a value when working with objc classes only?
Is some new API being planned that exposes this functionality?
Why is the proper interpretation of `_`?
The text was updated successfully, but these errors were encountered: