Attaching a screenshot of errors. How can I resolve it ?
Hi, Swift is asking for you to prevent confusion with nillableContinuation’s contents and value, there is no way to determine if it could change during execution. Are you able to make the captured value or nillableContinuation immutable in some way?
Hi,
This file (PassiveCaptcha.swift) actually comes from the Stripe iOS SDK. I haven’t written or modified it. The error occurs when I import Stripe 25.0.0 (and also earlier versions) in Xcode project.
I believe the issue is due to the SDK’s internal async code not being fully compatible with Swift 5.9’s new concurrency rules.
Since this is third-party code, is there any recommended solution which I can use on my end?
I would advise you to file a bug report with Stripe. I have not touched the Stripe API or it’s Swift codebase and as such would be ill equipped to suggest a patch without more awareness of design decisions.
I did see two potential changes which may work which is to:
- Make
nillableContinuationbe immutable with the let keyword - Remove the code which sets
nillableContinuationtonilafter it’s usage
which should clear up the immediate error but I cannot provide any certainty that they would work and wouldn’t be buggy.
P.S.
Are you using the Swift 6 Language Mode’s Concurrency Changes?
Stripe team has resolved my issue from their end. Thank you for your time.
