auth0 / SimpleKeychain

A simple Keychain wrapper for iOS, macOS, tvOS, and watchOS
https://auth0.github.io/SimpleKeychain
MIT License
587 stars 76 forks source link

@objc Annotations for Cross-Language usage #169

Closed braandl closed 2 years ago

braandl commented 2 years ago

Checklist

Describe the problem you'd like to have solved

The public accessors of the new Version (1.0) do not use the @objc modifier, thus they can not be used in legacy / objective-c code, which is sad and kind of unnecessary.

Describe the ideal solution

Add @objc to public method signatures

Alternatives and current workarounds

No response

Additional context

No response

Widcket commented 2 years ago

Hi @braandl, thanks for raising this. As mentioned in the migration guide, SimpleKeychain no longer supports Objective-C. So this is not something we'll be adding.

braandl commented 2 years ago

but why? isn't this totally unnecessary and a two minutes fix, simply forcing people like me to fork it?

Widcket commented 2 years ago

We're moving away from Objective-C in all our libraries.

two minutes fix

SimpleKeychain is a struct, so it's not possible to simply add @objc. That can only be added to classes that inherit from NSObject. As an alternative to forking, you could wrap it using a class with @objc members, like this: https://github.com/auth0/Auth0.swift/blob/1.39.1/Auth0/_ObjectiveWebAuth.swift