Creating KeyPaths at Runtime

Recently I've been eyeing StoredPropertyIterable after playing around with Swift's metadata capabilities, and my only question was how to create keypaths at runtime? I found swift_getKeyPath, but it requires a keypath pattern in order to instantiate, but I'm unsure how to construct such patterns because they're statically emitted in the resulting binary. Not to mention that it'd be ideal to create a keypath once cache for trivially computed ones like the compiler emits. cc: @Joe_Groff

1 Like
Terms of Service

Privacy Policy

Cookie Policy