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

Swift 6 support #890

Open
5 tasks done
honus opened this issue Nov 22, 2024 · 11 comments
Open
5 tasks done

Swift 6 support #890

honus opened this issue Nov 22, 2024 · 11 comments
Labels
feature request A feature has been asked for or suggested by the community

Comments

@honus
Copy link

honus commented Nov 22, 2024

Checklist

  • I have looked into the Readme, Examples, and FAQ and have not found a suitable solution or answer.
  • I have looked into the API documentation and have not found a suitable solution or answer.
  • I have searched the issues and have not found a suitable solution or answer.
  • I have searched the Auth0 Community forums and have not found a suitable solution or answer.
  • I agree to the terms within the Auth0 Code of Conduct.

Describe the problem you'd like to have solved

Compiling in Swift 6 language mode results in concurrency errors like problems with Sendability of Credentials as discussed in this forum issue from 2022 https://community.auth0.com/t/credentialsmanager-credentials-and-sendability/95271

Describe the ideal solution

The SDK should be updated to compile without errors when used in Swift 6.

Alternatives and current workarounds

Importing with @preconcurrency may be a workaround but could be hiding issues in concurrent code.

Additional context

No response

@honus honus added the feature request A feature has been asked for or suggested by the community label Nov 22, 2024
@Widcket
Copy link
Contributor

Widcket commented Jan 15, 2025

Hi @honus,

By "Compiling in Swift 6 language mode", do you mean changing the Swift version for the Auth0.swift target, or just your app's target?

Also, are you getting errors (compilation fails), or just warnings?

@honus
Copy link
Author

honus commented Jan 15, 2025

App's target. Errors.

@honus
Copy link
Author

honus commented Jan 15, 2025

Unfortunately my project isn't in a state where I can easily reproduce this issue right now. When I get a chance I'll try to get you more specific examples of problems.

@Widcket
Copy link
Contributor

Widcket commented Jan 16, 2025

I just tried with the sample app (cleaning the cache beforehand) and was able to compile successfully:

Screen.Recording.2025-01-16.at.16.00.13.mov

@papekoja
Copy link

We also have problems with compiling in Swift 6, it works fine as soon as swift 5 is selected. The error we get is this:

Image

@Widcket
Copy link
Contributor

Widcket commented Jan 28, 2025

Hi @papekoja, that doesn't seem to be a compiler error, but a trap instruction.

@papekoja
Copy link

@Widcket yes you're right, I formulated myself badly

@papekoja
Copy link

It compiles completely fine and this happens when the Swift language version is set to 6

@Widcket
Copy link
Contributor

Widcket commented Jan 28, 2025

@papekoja can you please post the stack trace (redacting things as needed)?

@papekoja
Copy link

There isn't any when this happens, unfortunately. The console is completely blank. I'm running Xcode 16.2 and Auth0 2.10.0 package version.

@Widcket
Copy link
Contributor

Widcket commented Jan 29, 2025

Try cleaning Derived Data after switching to Swift 6.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request A feature has been asked for or suggested by the community
Projects
None yet
Development

No branches or pull requests

3 participants