Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecation warnings when targeting iOS 14+ #294

Closed
AttilaTheFun opened this issue Feb 24, 2023 · 4 comments
Closed

Deprecation warnings when targeting iOS 14+ #294

AttilaTheFun opened this issue Feb 24, 2023 · 4 comments

Comments

@AttilaTheFun
Copy link

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!

@dfed
Copy link
Collaborator

dfed commented Feb 24, 2023

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:

// Xcode 13 and prior incorrectly say that LocalAuthentication is available on tvOS, so we have to check both as long as Xcode 13 and prior are supported.
#if !os(tvOS) && canImport(LocalAuthentication)

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

@AttilaTheFun
Copy link
Author

Sure that makes sense! I can try to put a PR together for that next week.

@NickEntin
Copy link
Collaborator

That approach sounds good to me 👍

@dfed
Copy link
Collaborator

dfed commented Apr 22, 2024

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.

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

No branches or pull requests

3 participants