Skip to content
This repository was archived by the owner on Jun 16, 2020. It is now read-only.

Secure keys cannot be made in Swift 3 #1

Open
fizker opened this issue Sep 17, 2016 · 0 comments
Open

Secure keys cannot be made in Swift 3 #1

fizker opened this issue Sep 17, 2016 · 0 comments

Comments

@fizker
Copy link

fizker commented Sep 17, 2016

The Clang ObjC importer in Swift 3 does a transform that breaks the recommended key generation ("".M().y().S().e().c().r().e().t().K().e().y()).

In order to automatically comply with the new API guide lines (which says that you should start any non-type with a lowercase letter), the importer transforms the functions for uppercased letters to lowercase, which conflicts with the lowercase letter functions.

Unfortunately, because of the typical length of keys put through your code, the Swift compiler spins into a deep loop and never finishes compiling.

To read more about the change, see https://github.com/apple/swift-evolution/blob/master/proposals/0005-objective-c-name-translation.md and search for Lowercase values.

Side note: Because you expose the letter functions as functions instead of properties, they become almost unreadable in Swift (any version). It seems a simple solution to change them from e.g. - (NSString *)a; to @property(readonly, copy) NSString *a;, which would make Swift read the same as ObjC.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant