Skip to content

Swift 6 support #890

Open
Open
@honus

Description

@honus

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

Activity

added
feature requestA feature has been asked for or suggested by the community
on Nov 22, 2024
Widcket

Widcket commented on Jan 15, 2025

@Widcket
Contributor

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

honus commented on Jan 15, 2025

@honus
Author

App's target. Errors.

honus

honus commented on Jan 15, 2025

@honus
Author

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

Widcket commented on Jan 16, 2025

@Widcket
Contributor

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

papekoja commented on Jan 28, 2025

@papekoja

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

Widcket commented on Jan 28, 2025

@Widcket
Contributor

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

papekoja

papekoja commented on Jan 28, 2025

@papekoja

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

papekoja

papekoja commented on Jan 28, 2025

@papekoja

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

Widcket

Widcket commented on Jan 28, 2025

@Widcket
Contributor

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

papekoja

papekoja commented on Jan 29, 2025

@papekoja

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

Widcket commented on Jan 29, 2025

@Widcket
Contributor

Try cleaning Derived Data after switching to Swift 6.

papekoja

papekoja commented on Feb 3, 2025

@papekoja

That did not help, unfortunately. I also tried the sample app you sent and that works fine for me as well in Swift 6. I find it hard to locate why we get this error since there aren't any error messages or stack trace. But I appreciate your responses

Widcket

Widcket commented on Feb 3, 2025

@Widcket
Contributor

I'm afraid that without more information there's not much we can do to troubleshoot this issue.

7 remaining items

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

feature requestA feature has been asked for or suggested by the community

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

    Development

    No branches or pull requests

      Participants

      @backslash-f@honus@Widcket@Kevinvandenhoek@papekoja

      Issue actions

        Swift 6 support · Issue #890 · auth0/Auth0.swift