shakedown.social is one of the many independent Mastodon servers you can use to participate in the fediverse.
A community for live music fans with roots in the jam scene. Shakedown Social is run by a team of volunteers (led by @clifff and @sethadam1) and funded by donations.

Administered by:

Server stats:

272
active users

#swiftdata

1 post1 participant0 posts today
Evan K. Stone<p>Swift Developers and Indies! 📣 </p><p>Join us for the Swift Developer Goals meeting today at 12:30PM PT:</p><p>💻 Sign up at <a href="https://swiftremotestudio.com" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="">swiftremotestudio.com</span><span class="invisible"></span></a><br>🎪 Join the Slack<br>🏁 Go to the `goals-friday` channel for the Zoom link</p><p>See you there!</p><p><a href="https://iosdev.space/tags/iOSDev" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>iOSDev</span></a> <a href="https://iosdev.space/tags/VisionPro" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>VisionPro</span></a> <a href="https://iosdev.space/tags/visionOS" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>visionOS</span></a> <a href="https://iosdev.space/tags/SwiftUI" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>SwiftUI</span></a> <a href="https://iosdev.space/tags/SwiftData" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>SwiftData</span></a> <a href="https://iosdev.space/tags/IndieDev" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>IndieDev</span></a></p>
Malcolm Hall<p><a href="https://mastodon.social/tags/SwiftData" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>SwiftData</span></a> @.Model's implementation of id breaks the Identifiable protocol because it is not stable between insert and save. This means it does not work reliably with .sheet(item:) and is inefficient with List/ForEach.</p><p><a href="https://stackoverflow.com/a/79616883/259521" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">stackoverflow.com/a/79616883/2</span><span class="invisible">59521</span></a></p>
Aleksander Stojanowski<p>I published a hot fix update this morning, but I even forgot to post about it. But it’s live and you can download it already. 😅 I, on the other hand, have been struggling with moving <a href="https://iosdev.space/tags/SwiftData" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>SwiftData</span></a> models to the shared framework. I can swear I worked yesterday! 😆<br><a href="https://iosdev.space/tags/BuildInPublic" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>BuildInPublic</span></a> <a href="https://iosdev.space/tags/IndieHacker" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>IndieHacker</span></a> <a href="https://iosdev.space/tags/iOSDev" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>iOSDev</span></a> <a href="https://iosdev.space/tags/IndieDev" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>IndieDev</span></a></p>
Keith Harrison :clubtwit:<p>How do you write SwiftData predicates to query for parent relationships? <a href="https://twit.social/tags/iOSDev" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>iOSDev</span></a> <a href="https://twit.social/tags/SwiftData" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>SwiftData</span></a> <a href="https://twit.social/tags/SwiftUI" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>SwiftUI</span></a> <a href="https://useyourloaf.com/blog/swiftdata-predicates-for-parent-relationships/" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">useyourloaf.com/blog/swiftdata</span><span class="invisible">-predicates-for-parent-relationships/</span></a></p>
Evan K. Stone<p>Join us for the Swift Developer Goals meeting today at 12:30PM PT! 🏁</p><p>Sign up for the Slack access at swiftremotestudio.com and find the link to the Zoom meeting in the goals-friday channel.</p><p>In addition to goal setting, we also usually chat about: <br><a href="https://iosdev.space/tags/iOSDev" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>iOSDev</span></a> <a href="https://iosdev.space/tags/VisionPro" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>VisionPro</span></a> <a href="https://iosdev.space/tags/visionOS" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>visionOS</span></a> <a href="https://iosdev.space/tags/SwiftUI" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>SwiftUI</span></a> <a href="https://iosdev.space/tags/SwiftData" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>SwiftData</span></a></p>
Patrick McConnell<p>I mentioned last week I would put together a blog post gathering my thoughts and process in working thru <a href="https://mastodon.social/tags/SwiftData" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>SwiftData</span></a> Migrations.</p><p>Have at it…</p><p>SwiftData Migrations and the Real World: <a href="https://pmcconnell.micro.blog/2025/04/15/swiftdata-migrations-and-the-real.html" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">pmcconnell.micro.blog/2025/04/</span><span class="invisible">15/swiftdata-migrations-and-the-real.html</span></a></p><p><a href="https://mastodon.social/tags/Swift" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Swift</span></a> <a href="https://mastodon.social/tags/iOSDev" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>iOSDev</span></a> <a href="https://mastodon.social/tags/macOSDev" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>macOSDev</span></a></p>
Rasmus Grouleff (he/him)<p>Heeeelp!</p><p>What does the following error mean, and how do I fix it? It happens, when I call `modelContext.save()` in a SwiftUI view.</p><p>"SwiftData/ModelCoders.swift:105: Fatal error: Composite Coder only supports Keyed Container”</p><p>Edit: Solved! It appears SwiftData does not support Duration properties in models. Changing it to a TimeInterval instead fixes it.</p><p><a href="https://mstdn.social/tags/Swift" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Swift</span></a> <a href="https://mstdn.social/tags/SwiftUI" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>SwiftUI</span></a> <a href="https://mstdn.social/tags/SwiftData" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>SwiftData</span></a></p>
Patrick McConnell<p>Biggest tip I can offer when working through a migration strategy, is to work on a new git branch so you can delete a bad data store, restore the old working branch and start over.</p><p>You can create a rollback strategy as well but I found it just as easy to delete the bad data store, revert to working data and try again.</p><p>If you don't start a migration clean and it has previously failed you may find a lot of duplicate data once it does work all the way thru.</p><p> <a href="https://mastodon.social/tags/SwiftData" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>SwiftData</span></a> <a href="https://mastodon.social/tags/Swift" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Swift</span></a> <a href="https://mastodon.social/tags/iOSDev" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>iOSDev</span></a> <a href="https://mastodon.social/tags/macOSDev" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>macOSDev</span></a></p>
Patrick McConnell<p>In my case I was migrating from a schema where a relationship was becoming many to many. I needed to gather all the current single relationships in willMigrate and then in didMigrate I had to add them to the new to many relationship.</p><p>There is no relationship between willMigrate and didMigrate so you need to do some sketchy (globals) things to pass data across contexts.</p><p>Once I'm comfortable I've gotten this all correct, I’ll do a blog post.</p><p><a href="https://mastodon.social/tags/SwiftData" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>SwiftData</span></a> <a href="https://mastodon.social/tags/Swift" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Swift</span></a> <a href="https://mastodon.social/tags/iOSDev" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>iOSDev</span></a> <a href="https://mastodon.social/tags/macOSDev" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>macOSDev</span></a></p>
Patrick McConnell<p>You do not need to update any models in willMigrate if they are the same across schemas. </p><p>You may only need to make changes in didMigrate, for example setting defaults for new Model values.</p><p> <a href="https://mastodon.social/tags/SwiftData" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>SwiftData</span></a> <a href="https://mastodon.social/tags/Swift" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Swift</span></a> <a href="https://mastodon.social/tags/iOSDev" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>iOSDev</span></a> <a href="https://mastodon.social/tags/macOSDev" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>macOSDev</span></a></p>
Patrick McConnell<p>TIL working with <a href="https://mastodon.social/tags/SwiftData" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>SwiftData</span></a> migrations the past few days.</p><p>The documentation is non-existent. The sample code, tutorials, etc are all copying mostly trivial examples and sadly each other.</p><p>A custom migration schema has two phases each is passed a context. The first, willMigrate, will have the context for the schema you are migrating from, the second, didMigrate will have the newest context.</p><p><a href="https://developer.apple.com/documentation/swiftdata/migrationstage/custom(fromversion:toversion:willmigrate:didmigrate:)" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">developer.apple.com/documentat</span><span class="invisible">ion/swiftdata/migrationstage/custom(fromversion:toversion:willmigrate:didmigrate:)</span></a></p><p><a href="https://mastodon.social/tags/Swift" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Swift</span></a> <a href="https://mastodon.social/tags/iOSDev" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>iOSDev</span></a> <a href="https://mastodon.social/tags/macOSDev" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>macOSDev</span></a></p>
Aleksander Stojanowski<p>Sorry <span class="h-card" translate="no"><a href="https://mastodon.social/@mattiem" class="u-url mention" rel="nofollow noopener noreferrer" target="_blank">@<span>mattiem</span></a></span> for giving yet another example of strong behavior of ModelActor. I hope maybe you can understand why it’s behaving so strangely. 😅<br><a href="https://iosdev.space/tags/SwiftData" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>SwiftData</span></a> <a href="https://iosdev.space/tags/ModelActor" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>ModelActor</span></a></p>
Swift over Coffee<p>S4E5: <span class="h-card" translate="no"><a href="https://swiftdevs.space/@mikaelacaron" class="u-url mention" rel="nofollow noopener noreferrer" target="_blank">@<span>mikaelacaron</span></a></span> and <span class="h-card" translate="no"><a href="https://mastodon.social/@twostraws" class="u-url mention" rel="nofollow noopener noreferrer" target="_blank">@<span>twostraws</span></a></span> talk networking – mostly about getting computers to talk to each other, but also, just as dauntingly, about talking to other humans at conferences too. 😱</p><p>Plus: news, Apple delays, and the trifling little matter of the major changes you’re hoping to see in <a href="https://mastodon.social/tags/Xcode" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Xcode</span></a>, <a href="https://mastodon.social/tags/SwiftUI" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>SwiftUI</span></a>, <a href="https://mastodon.social/tags/SwiftData" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>SwiftData</span></a> and more as <a href="https://mastodon.social/tags/WWDC25" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>WWDC25</span></a> rolls around!</p><p>🎧 <a href="https://podcasts.apple.com/gb/podcast/swift-over-coffee/id1435076502?i=1000700512953" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">podcasts.apple.com/gb/podcast/</span><span class="invisible">swift-over-coffee/id1435076502?i=1000700512953</span></a></p>
Aleksander Stojanowski<p>Took a deep dive into SwiftData today! 🏊‍♂️💾 Moved operations to background threads, including the heavyweight streak recalculation. Was feeling pretty proud until I noticed the “automagic” SwiftUI animations vanished! 😱 <a href="https://iosdev.space/tags/SwiftData" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>SwiftData</span></a> <a href="https://iosdev.space/tags/iOSPerformance" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>iOSPerformance</span></a></p>
Aleksander Stojanowski<p>Took a deep dive into SwiftData today! 🏊‍♂️💾 Moved operations to background threads, including the heavyweight streak recalculation. Was feeling pretty proud until I noticed the “automagic” SwiftUI animations vanished! 😱 <a href="https://iosdev.space/tags/SwiftData" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>SwiftData</span></a> <a href="https://iosdev.space/tags/iOSPerformance" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>iOSPerformance</span></a></p>
timmitra<p>A few months ago, I wrote a comprehensive course on SwiftData. Its just been published for Kodeco subscribers. </p><p><a href="https://mastodon.social/tags/swiftdata" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>swiftdata</span></a> </p><p><a href="https://www.kodeco.com/ios/paths/continuing-swiftui/45123174-data-persistence-with-swiftdata" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://www.</span><span class="ellipsis">kodeco.com/ios/paths/continuin</span><span class="invisible">g-swiftui/45123174-data-persistence-with-swiftdata</span></a></p>
Shane Becker<p><a href="https://ruby.social/tags/SwiftData" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>SwiftData</span></a> question—</p><p>Schema:<br>Author, hm Posts<br>Post, hm Comments</p><p>I want to make `author.comments`</p><p>Can I do queries in the Post model or only in a SwiftUI View?</p><p>Can I do queries as an attribute/method for consumption by multiple callers?</p><p>(Like <a href="https://ruby.social/tags/Rails" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Rails</span></a>' `scope` or has_many_through)</p>
Patrick McConnell<p>Refactored a gnarly bundle of code to make it correct for <a href="https://mastodon.social/tags/Swift" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Swift</span></a> Concurrency.</p><p>I have a better handle on it all now but I still see a few areas it needs to improve</p><p>Passing results from async to the main thread is far too difficult requiring a lot of scaffolding to allow: self.stuff = asyncStuff</p><p><a href="https://mastodon.social/tags/SwiftData" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>SwiftData</span></a> needs to work better with async/await. One side of the other needs to improve.</p><p>In general, it's just too much thinking, tweaking and adorning your code with magic keywords and types</p><p><a href="https://mastodon.social/tags/iOSDev" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>iOSDev</span></a></p>
Kern Jackson :xcode:<p>My main gripe with SwiftData is having to import SwiftData into virtually all of my views. Is that just how it is, or am I holding it wrong?</p><p><a href="https://iosdev.space/tags/iOSDev" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>iOSDev</span></a> <a href="https://iosdev.space/tags/SwiftUI" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>SwiftUI</span></a> <a href="https://iosdev.space/tags/SwiftData" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>SwiftData</span></a></p>
Aleksander Stojanowski<p>Now back to my strange errors - I kinda did it to myself. 🙈 As a workaround, for I don’t remember what exactly, I decided to manually save <a href="https://iosdev.space/tags/SwiftData" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>SwiftData</span></a> context after each change to models. For some reason, I don’t understand, that causes problems with the <a href="https://iosdev.space/tags/SwiftUI" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>SwiftUI</span></a> update process.</p>