evgenyneu / keychain-swift

Helper functions for saving text in Keychain securely for iOS, OS X, tvOS and watchOS.
MIT License
2.82k stars 345 forks source link

[Feature] Added ability to get data reference #99

Closed mediym41 closed 5 years ago

mediym41 commented 5 years ago

Used for NEVPNProtocolIKEv2 password

evgenyneu commented 5 years ago

Thanks for the update, what was your motivation? Why it could be useful for people to get a reference to the data instead of the data.

mediym41 commented 5 years ago

Talking about motivation I like your library and it helped me a lot and I want to help you back. Some apple api require reference to the data from keychain has not ability to pass the data by value. For example NEVPNProtocol (https://developer.apple.com/documentation/networkextension/nevpnprotocol) has no password property for data, only reference to a keychain item containing the password. I think it will be good solution because it does not break any logic, more over it gives opportunity to choose the receiving of data

mediym41 commented 5 years ago

Did it

evgenyneu commented 5 years ago

Thanks for your help! I've released your change in version 15. 👍