The following Swift UIKit code produces the warning Cannot access property 'authController' with a non-sendable type 'AuthController' from non-isolated deinit; this is an error in Swift 6: import UIKit class AuthFormNavC: UINavigationController { let authController: AuthController init(authController: AuthController) { self.authController = authController super.init(rootViewController: ConsentVC()) } required init?(coder aDecoder: NSCoder) { fatalError(init(coder:) has not been implemented) } deinit { authController.signInAnonymouslyIfNecessary() } } Swift 5.10, Xcode 15.3 with complete strict concurrency checking. What is the workaround? Please don't ask me why I'm doing what I'm doing or anything unrelated to the question. If you're wondering why I want to call authController.signInAnonymouslyIfNecessary() when the navigation controller is denitialized, my goal is to call it when the navigation controller is dismissed (or popped), and I think that the deinitializer of a view contr
Search results for
Swift 6
49,194 results found
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
That's not presented as a book, but you have all the doc for Swift 6 here in swift.org: https://docs.swift.org/swift-book/documentation/the-swift-programming-language/
Topic:
Programming Languages
SubTopic:
Swift
It’s better to reply as a reply, rather than in the comments; see Quinn’s Top Ten DevForums Tips for this and other titbits. I wonder when/if staying on swift 5 will become penalized Keep in mind Xcode 16 uses the Swift 6 compiler in all cases. What we’re talking about here is the language mode. When you enable the Swift 6 language mode, the Swift compilers turns concurrency warnings into errors, inserts traps to catch concurrency problems at runtime, and so on. Language modes tend to be long-lived. For example, the Swift 6 compiler supports the following language modes: 6, 5, 4.2, and 4. So, while I can’t predict the future, I expect that the Swift 5 language mode will be with us for a while. Share and Enjoy — Quinn “The Eskimo!” @ Developer Technical Support @ Apple let myEmail = eskimo + 1 + @ + apple.com
Topic:
Programming Languages
SubTopic:
Swift
Tags:
Same here in a project with multiple sub-projects. Try to fix it by setting to Swift 6, but still no avail.
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags:
I forgot to include the environment details: Xcode: Version 16.0 beta 3 (16A5202i) Swift: Swift 6 Strict Concurrency Checking: Complete
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags:
Hello @sanderfrenken, Thank you for raising this issue! Unfortunately, I don't have a good solution for you. Anything that you could do to get this integration working in Swift 6 would rely on very fragile assumptions that I won't recommend you make. It is better for you to file an enhancement request using Feedback Assistant, to request changes to SpriteKit and GameplayKit that would better facilitate their integration in a Swift 6 app. For now, I recommend that you stick with the Swift 5 language mode while you wait for resolution on your bug report. Best regards, Greg
Topic:
Graphics & Games
SubTopic:
GameKit
Tags:
I think this requires adding @Bindable to the appData declaration. @Bindable var appData:AppData This is from WWDC23 Discover Observation in Swift 6:27
Topic:
App & System Services
SubTopic:
iCloud & Data
Tags:
Late to the game but for what its worth: FB15133265 - Swift Data / Swift 6: Create mechanism for object identifier that is 'immutable' that satisfies 'expand accessors on variable declared with let'
Topic:
Developer Tools & Services
SubTopic:
Xcode
Tags:
I now understand the the warnings go away under Swift 6 as 'InferSendableFromCaptures' has been enabled. I still have the crash. Guess I better dig in.
Topic:
App & System Services
SubTopic:
iCloud & Data
Tags:
That seems a reasonable guess. So it's time to prepare: https://wwdcnotes.com/documentation/wwdcnotes/wwdc24-10169-migrate-your-app-to-swift-6/
Topic:
App Store Distribution & Marketing
SubTopic:
App Store Connect
Tags:
Thanks a bunch for the help! After following your advice and switching to Swift 6, all the warnings disappeared and everything is working like a charm.
Topic:
App & System Services
SubTopic:
iCloud & Data
Tags:
Also, I can't run Xcode 15.4 in macOS Sequoia, does it mean if I want to keep supporting 15.4 and Swift 5.10 without Swift 6 runtime checks I have to stay in Sonoma?
Topic:
Programming Languages
SubTopic:
Swift
An easy workaround is: Editor -> Canvas -> Enable Legacy Previews Execution. It's not a fix, but it allows you to run previews while updating your views to Swift 6.
Topic:
Developer Tools & Services
SubTopic:
Xcode
Tags:
The Integrating CarPlay with your quick-ordering app might be the closest sample project but it is not optimized for Swift 6. Rico WWDR - DTS - Software Engineer
Topic:
App & System Services
SubTopic:
General
Tags:
Thanks! I'm afraid I still need to support Ventura, so I can't adopt Swift 6 just yet. I have a tool that verifies volumes using diskutil.
Topic:
App & System Services
SubTopic:
Processes & Concurrency
Tags: