Davuth
banner
davuthdv.bsky.social
Davuth
@davuthdv.bsky.social
indie iOS developer • making small simple apps
🎯 target: 50 apps
🛳️ now: 3 apps
🐌 progress: ▓░░░░░░░░░ 3/50

Apps:
https://appgallery.io/davuthdv
So far so good. Except that in Swift 6.2, you will need to set model as nonisolated.

But I'm only using it in a small part in the app. My usecase is small.
November 11, 2025 at 6:47 PM
Ahhh... kinda make sense, actually. I was thinking along the line that... since model will be used to update some views anyway, it should be MainActor.
November 11, 2025 at 6:45 PM
I also feel that it's a bit strange, although I don't really know why.

Luckily, Supabase covers only a small feature in my app. So I only have to set one model as nonisolated. It would be weird if every model has to be nonisolated.
November 11, 2025 at 5:34 PM
I see. I'm not even attempting to understand the whole protocol conformances for Swift 6 right now. Sounds like it's a whole complicated issue on its own.

But my question is... any potential issues for declaring model (struct) as nonisolated?
November 11, 2025 at 1:42 PM
Yes! I'll send the Matt Signal. Thank you so much 🙏
November 11, 2025 at 10:12 AM
I did that, but without understanding what swift6 tries to solve, it was just very difficult. I mindlessly added Sendable and MainActor here and there just to silent the compiler. And it backfires.

But yeah, if I didn't start with something, I wouldn't know what to search for.
November 11, 2025 at 2:28 AM
Luckily, there are a ton of articles on this. I read both yours and Donny's.

I'm to blame for this. I didn't catch up when Swift 6 was introduced. I was waiting for the approachable concurrency to release to catch up at once. That's why.

This feels like Swift 3 all over again.
November 10, 2025 at 7:04 PM
Not disappointed, just overwhelmed.

I thought I can just figure things out 1 error at a time, but no. Without knowing the whole thing, there's no way I could understand what's going on. I can't even understand the error message.

I need to read and compare the before and after of Swift 6 & 6.2.
November 10, 2025 at 7:04 PM
Much better than yesterday. That's for sure. 😬
November 10, 2025 at 2:40 PM
Got it. 🙏
November 8, 2025 at 4:28 PM
What check are you referring to, by the way?
November 8, 2025 at 4:12 PM
I can always stay in swift 5, but I just think it's a good idea to learn the new stuff.

Anyway, thank you so much for your help. Really appreciate your time. 🙏
November 8, 2025 at 4:06 PM
Maybe I'm an idiot, but what if I keep using Swift 5?

Yes, Swift 6 is supposed to help make concurrency safer, but it definitely comes with its own challenge. And also, my apps are generally small apps anyway.
November 8, 2025 at 3:48 PM
making the extension nonisolated fixes it. Gosh! I could never guess this is an issue.

And sadly, this is what I refer to in my original post. I didn't have this concurrency issue before but now I do.
November 8, 2025 at 3:48 PM
this is where my lack of knowledge on concurrency is causing me trouble.

1. How do you know it will run on background thread?

2. I'm going to read up on when to use the @.Sendable closure. This is a blur right now.

3. Things like this, I really expect the compiler to help spot the issue.
November 8, 2025 at 3:25 PM
you mean... something like this?
November 8, 2025 at 3:19 PM
I don't know if this is the root cause or not, but I see this file as part of the trace. What do you think?

I just want a convenient method where I can initialize a Color that adapts to both light and dark.
November 8, 2025 at 3:04 PM
I see... Got it.
November 8, 2025 at 2:53 PM
Hmm... I'm struggling to read the backtrace. If it's something to do with my code, it normally points me to where it originates from. But I can't seem to find any.

And what you say about missing @.Sendable, it sounds to me like something a compiler could catch. No?
November 8, 2025 at 2:50 PM
Matt Signal
a man in a cape stands in front of a batman logo in the sky .
ALT: a man in a cape stands in front of a batman logo in the sky .
media.tenor.com
November 8, 2025 at 2:34 PM