keychain-swift icon indicating copy to clipboard operation
keychain-swift copied to clipboard

`KeychainSwiftAccessOptions` tweak for Objective-C

Open lawmaestro opened this issue 6 years ago • 3 comments

Marked up KeychainSwiftAccessOptions with a @objc annotation and made an integer raw type so this enum can be used when bridging in Objective-C.

lawmaestro avatar Aug 05 '18 12:08 lawmaestro

Thanks for the pull request, but I can not accept it, unfortunately. I intended keychain-swift to be a pure Swift library, and try to avoid any references to objective-C. For people who still want to use it from Objective-C projects, there is a KeychainSwiftCBridge.swift file. Since it is not included with the library, this is a good place to add Objective-C-related code. Feel free to resubmit a pull request, if it works for you. Thanks 👍

evgenyneu avatar Aug 05 '18 23:08 evgenyneu

Hi. So I'm using an adapted 'KeychainSwiftCBridge.swift' file which exposes the setter with KeychainSwiftAccessOptions. However in order to expose that I had to make the tweak in this PR. I hear what you're saying with regards to adding Objective-C references but it seems to fairly trivial thing to get hung up on. Still, it's your call :)

lawmaestro avatar Aug 10 '18 17:08 lawmaestro

I'm sorry about that. I hope you find a good objective-c friendly alternative. :)

evgenyneu avatar Aug 10 '18 22:08 evgenyneu