Swift 6 crash
Nobody has claimed this yet.
- Dominant language
- Objective-C
- Stars
- 2k
- Forks
- 867
- Avg merge
- 4d 48m
- Merged PRs (30d)
- 1
Description
Describe the bug
I'm seeing an unexpected crash inside AppAuthCore when the module that calls into AppAuth is in Swift 6 mode.
Setting
swiftSettings: [
.swiftLanguageMode(.v5),
]
makes the crash go away.
To Reproduce
Steps to reproduce the behavior:
let request = OIDAuthorizationRequest(
configuration: config,
clientId:clientId,
scopes: nil,
redirectURL: URL(string: redirectUri)!,
responseType: OIDResponseTypeCode,
additionalParameters: nil
)
OIDAuthState.authState(
byPresenting: request,
presenting: NSApp.keyWindow ?? NSWindow()
) { authState, error in ... }
then dismiss Safari and get an EXC_BREAKPOINT crash on the line callback(nil, authorizationError); in OIDAuthState.m
Expected behavior
The Swift 5 behaviour: The same library line is still hit, but no crash occurs
Environment
- Device: [ MacBook Pro ]
- OS: [ macOS 15.0 ]
- Browser: [ Safari ]
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the authorization flow in Swift 6 mode on macOS 15, then inspect the callback at callback(nil, authorizationError) in OIDAuthState.m. Compare the behavior with Swift 5 mode and determine what change prevents the EXC_BREAKPOINT while preserving the existing authorization error callback behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- macos, objective-c, swift
- Domain
- desktop-dev, mobile-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100