Valet
Valet copied to clipboard
Deprecation warnings when targeting iOS 14+
I'm using Valet via SPM and just started targeting iOS 14.
I'm seeing the following deprecation warnings from SecureEnclave.swift:
'kSecUseOperationPrompt' was deprecated in iOS 14.0: Use kSecUseAuthenticationContext and set LAContext.localizedReason property
'kSecUseAuthenticationUIFail' was deprecated in iOS 14.0: Instead of kSecUseAuthenticationUI, use kSecUseAuthenticationContext and set LAContext.interactionNotAllowed property
I generally try to treat warnings as errors and it would be great if these could be resolved. Let me know if you'd prefer I create a pull request or you'd like to fix the warnings yourselves. Thanks!
Hey Logan! Good to hear from you, and thanks for letting us know about this issue.
The wrinkle with fixing this issue will be that the LocalAuthentication framework doesn't exist on tvOS:
https://github.com/square/Valet/blob/56952ae2a74bed54ac62ed429e5d66cd0eaab383/Sources/Valet/SinglePromptSecureEnclaveValet.swift#L17-L18
Given these warnings, and given that LocalAuthentication is missing from tvOS: it sounds like we should remove SecureEnclaveValet from the tvOS target entirely, taking a similar approach as we did in #284. I don't have the bandwidth to put a PR together for this at the moment, and would welcome one from you.
I think we'll treat this issue as a bugfix bump since from the warning it looks like SecureEnclaveValet never actually worked on tvOS (it works on simulator / tests but apparently the simulator can get this kind of thing wrong), and given that no one ever told us that this wasn't working it seems like no one was using the feature.
Let me know your thoughts. cc @NickEntin
Sure that makes sense! I can try to put a PR together for that next week.
That approach sounds good to me 👍
Going to close this out. This warning is likely only occurring for you because you're using a custom build system – I just tested consuming Valet with SPM on a project that targets only the latest iOS and I saw no warnings.
The approach described above I believe is still one we should take, but it isn't an issue that needs addressing today, and I'm trying to do a little roomba-ing.