Sample Code with Swift 6

I find these sample projects quite valuable:

Both use Swift 5, and it is not trivial to adopt Swift 6 with them.

Any plans to update them? What is best approach for adopting Swift 6 on such sample code?

Answered by DTS Engineer in 891016022
Any plans to update them?

We can’t talk about The Future™. See tip 3 in Quinn’s Top Ten DevForums Tips. So, if you’d like to see this improve, I recommend that you file a bug against each of the samples.

Please post your bug numbers, just for the record.

What is best approach for adopting Swift 6 on such sample code?

I don’t think it makes sense to try to port the samples to Swift 6. There’s quite a substantial task. Rather, I think it’s better to extract the core concepts from those samples that are relevant to your app, and then adapt those concepts to Swift 6.

If you have questions about the specifics, I’d be happy to answer them.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Accepted Answer
Any plans to update them?

We can’t talk about The Future™. See tip 3 in Quinn’s Top Ten DevForums Tips. So, if you’d like to see this improve, I recommend that you file a bug against each of the samples.

Please post your bug numbers, just for the record.

What is best approach for adopting Swift 6 on such sample code?

I don’t think it makes sense to try to port the samples to Swift 6. There’s quite a substantial task. Rather, I think it’s better to extract the core concepts from those samples that are relevant to your app, and then adapt those concepts to Swift 6.

If you have questions about the specifics, I’d be happy to answer them.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Thanks Quinn!

I've added two feedbacks: FB23098055 and FB23098306.

On the CoreData / CloudKit one (https://developer.apple.com/documentation/coredata/sharing-core-data-objects-between-icloud-users) - I've found that NSManagedObjectContext is sendable (https://fatbobman.com/en/posts/sendable-nsmanagedobjectcontext/). From it I can get the persistence controller, and from it I get the stores and this solves the Swift 6 migration path and looks good.

@DTS Engineer What would you say about such approach?

I’m not the right person to help you with Core Data issues. I recommend that you start a new thread in App & System Services > iCloud, making sure to tag it with Core Data, CloudKit, and Concurrency.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

For anyone interested in following the conversation it is here.

Sample Code with Swift 6
 
 
Q