norden.social is one of the many independent Mastodon servers you can use to participate in the fediverse.
Moin! Dies ist die Mastodon-Instanz für Nordlichter, Schnacker und alles dazwischen. Folge dem Leuchtturm.

Administered by:

Server stats:

3.2K
active users

#swiftdata

2 posts2 participants0 posts today
Axel Le Pennec<p>I filed this feedback to make Enums better with SwiftData: FB19106719</p><p><span class="h-card" translate="no"><a href="https://hachyderm.io/@ricketson" class="u-url mention" rel="nofollow noopener" target="_blank">@<span>ricketson</span></a></span> <span class="h-card" translate="no"><a href="https://mastodon.social/@lucabernardi" class="u-url mention" rel="nofollow noopener" target="_blank">@<span>lucabernardi</span></a></span> <span class="h-card" translate="no"><a href="https://indieweb.social/@curtclifton" class="u-url mention" rel="nofollow noopener" target="_blank">@<span>curtclifton</span></a></span> </p><p>I couldn’t find anyone working in the <a href="https://iosdev.space/tags/CoreData" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>CoreData</span></a> or <a href="https://iosdev.space/tags/SwiftData" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>SwiftData</span></a> team so I ping you. Thank you.</p>
Axel Le Pennec<p>I enjoy using <a href="https://iosdev.space/tags/SwiftData" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>SwiftData</span></a> until I have to use a RawRepresentable (String or Int) enum in a Predicate.</p><p>Any tips to share?</p><p>Should I only store the enum RawValue instead of using the Enum type?</p>
aaron<p>Let’s say I want to display &gt; 100k items from <a href="https://mastodon.social/tags/SwiftData" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>SwiftData</span></a> in a Table view in <a href="https://mastodon.social/tags/SwiftUI" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>SwiftUI</span></a>: is there a way to do that lazily so performance doesn’t become a nightmare? Or do I need to use AppKit’s NSTableView instead? <a href="https://mastodon.social/tags/macOSDev" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>macOSDev</span></a> <a href="https://mastodon.social/tags/Swift" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Swift</span></a></p>
Helge Heß<p>Is the <a href="https://mastodon.social/tags/SwiftLang" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>SwiftLang</span></a> Predicate macro used for anything else but <a href="https://mastodon.social/tags/SwiftData" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>SwiftData</span></a>? E.g. RealityKit has its own `QueryPredicate`.<br>It almost seems that Predicate is indeed somewhat useless w/o also standardizing the static metadata property, currently part of SwiftData's `PersistentModel`: <a href="https://developer.apple.com/documentation/swiftdata/persistentmodel/schemametadata" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">developer.apple.com/documentat</span><span class="invisible">ion/swiftdata/persistentmodel/schemametadata</span></a><br>As per <a href="https://forums.swift.org/t/keypath-string/77732" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">forums.swift.org/t/keypath-str</span><span class="invisible">ing/77732</span></a></p>
Helge Heß<p><a href="https://mastodon.social/tags/SwiftData" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>SwiftData</span></a> is a beauty. (also, all that WET)</p>
Axel Le Pennec<p>I wish Apple used SwiftData in its sample <a href="https://iosdev.space/tags/WWDC25" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>WWDC25</span></a> code projects...</p><p>It would have been a great opportunity to showcase how to use SwiftData properly with App Intents using an AppDependencyManager for example.</p><p><a href="https://iosdev.space/tags/SwiftData" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>SwiftData</span></a> <a href="https://iosdev.space/tags/iOSDev" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>iOSDev</span></a></p>
Konstantin 🔭<p>Does anyone know if there is a way to make SwiftData print more verbose model serialisation / migration errors?</p><p>For example, I'm converting a model field from String to a raw representable Enum, but something in the data is failing during automigration?</p><p><a href="https://mastodon.social/tags/Swift" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Swift</span></a> <a href="https://mastodon.social/tags/SwiftData" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>SwiftData</span></a> <a href="https://mastodon.social/tags/SwiftDev" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>SwiftDev</span></a></p>
Axel Le Pennec<p>Oh wow 😲</p><p>SwiftData models are now Sendable! 🤩</p><p>And it has been backported to iOS 17.0+! 🥳</p><p>This will make working in with concurrent code easier.</p><p>Documentation updated during WWDC25: <a href="https://developer.apple.com/documentation/swiftdata/model" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">developer.apple.com/documentat</span><span class="invisible">ion/swiftdata/model</span></a>()</p><p><a href="https://iosdev.space/tags/SwiftData" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>SwiftData</span></a> <a href="https://iosdev.space/tags/WWDC25" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>WWDC25</span></a></p>
Aleksander Stojanowski<p>Especially the <a href="https://iosdev.space/tags/SwiftData" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>SwiftData</span></a> related code. I moved everything into the background thread, so that app works smoothly, but at the cost of code readability. Until I worked daily on that, it seemed fine. Nowadays, I see a lot of things I could improve.</p>
Patrick McConnell<p>One of the more tedious things to do with <a href="https://mastodon.social/tags/Xcode" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Xcode</span></a> and <a href="https://mastodon.social/tags/SwiftUI" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>SwiftUI</span></a> is to set up previews for complex scenarios such as things with deep <a href="https://mastodon.social/tags/SwiftData" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>SwiftData</span></a> schemas.</p><p>Its also one of the more rewarding things. It's worth it 99 out of 100 times.</p><p>Not only can you iterate on views and components but it helps you think about your apps architecture. I almost always consider different structure to my code when I get stuck on creating a preview.</p><p><a href="https://mastodon.social/tags/iOSDev" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>iOSDev</span></a> <a href="https://mastodon.social/tags/macOSDev" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>macOSDev</span></a></p>
Tim De Jong<p>I'm loving the new <span class="h-card" translate="no"><a href="https://hachyderm.io/@pointfreeco" class="u-url mention" rel="nofollow noopener" target="_blank">@<span>pointfreeco</span></a></span> SharingGRDB framework! It's so much better to work with value-type models than reference-type models. </p><p>In the code below I'm migrating from SwiftData to SharingGRDB. First I put the creation of the Weight.Draft inside the async block below. This gave me an error because the SwiftData models are not sendable. The SharingGRDB models are so the fix was so simple :) </p><p><a href="https://mastodon.social/tags/swift" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>swift</span></a> <a href="https://mastodon.social/tags/swiftlang" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>swiftlang</span></a> <a href="https://mastodon.social/tags/swiftdata" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>swiftdata</span></a> <a href="https://mastodon.social/tags/sharinggrdb" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>sharinggrdb</span></a> <a href="https://mastodon.social/tags/structuredconcurrency" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>structuredconcurrency</span></a></p>
Axel Le Pennec<p>Well, too good to be true... 😢</p><p><a href="https://iosdev.space/tags/SwiftData" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>SwiftData</span></a> inheritance is only available for iOS 26, as specified in the <a href="https://iosdev.space/tags/WWDC25" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>WWDC25</span></a> session and the new article "Adopting inheritance in SwiftData".</p><p>Article: <a href="https://developer.apple.com/documentation/swiftdata/adopting-inheritance-in-swiftdata" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">developer.apple.com/documentat</span><span class="invisible">ion/swiftdata/adopting-inheritance-in-swiftdata</span></a></p>
Axel Le Pennec<p>Oh! <a href="https://iosdev.space/tags/SwiftData" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>SwiftData</span></a> inheritance seems to be available on iOS 17+!</p><p>Documentation: <a href="https://developer.apple.com/documentation/swiftdata/schema/entity/superentity" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">developer.apple.com/documentat</span><span class="invisible">ion/swiftdata/schema/entity/superentity</span></a></p><p><a href="https://iosdev.space/tags/WWDC25" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>WWDC25</span></a></p>
Helge Heß<p>If you want to toy around with <a href="https://mastodon.social/tags/SwiftData" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>SwiftData</span></a>, but need some sample data, I have that <a href="https://mastodon.social/tags/Northwind" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Northwind</span></a> import. Which took a loooong time, but once it is in, it's ok 🙂 <br><a href="https://github.com/Northwind-swift/NorthwindSwiftData" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">github.com/Northwind-swift/Nor</span><span class="invisible">thwindSwiftData</span></a></p>
Swift Remote Studio<p>Hey Swift, iOS, Indie Developers! 👋🏻</p><p>Join us for a Developer Goals meeting today at 12:30PM PT!</p><p>💻 Sign up at <a href="https://swiftremotestudio.com" rel="nofollow noopener" 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` Slack 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" target="_blank">#<span>iOSDev</span></a> <a href="https://iosdev.space/tags/VisionPro" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>VisionPro</span></a> <a href="https://iosdev.space/tags/visionOS" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>visionOS</span></a> <a href="https://iosdev.space/tags/SwiftUI" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>SwiftUI</span></a> <a href="https://iosdev.space/tags/SwiftData" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>SwiftData</span></a> <a href="https://iosdev.space/tags/IndieDev" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>IndieDev</span></a> <a href="https://iosdev.space/tags/WWDC25" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>WWDC25</span></a></p>
Evan K. Stone<p>Hey Swift, iOS, Indie Developers! 👋🏻</p><p>Join us for a Developer Goals meeting today at 12:30PM PT!</p><p>💻 Sign up at <a href="https://swiftremotestudio.com" rel="nofollow noopener" 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` Slack 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" target="_blank">#<span>iOSDev</span></a> <a href="https://iosdev.space/tags/VisionPro" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>VisionPro</span></a> <a href="https://iosdev.space/tags/visionOS" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>visionOS</span></a> <a href="https://iosdev.space/tags/SwiftUI" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>SwiftUI</span></a> <a href="https://iosdev.space/tags/SwiftData" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>SwiftData</span></a> <a href="https://iosdev.space/tags/IndieDev" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>IndieDev</span></a> <a href="https://iosdev.space/tags/WWDC25" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>WWDC25</span></a></p>
Deirdre Saoirse Moen<p>Adventures in mystery: if you use @Attribute(.externalStorage) in your <a href="https://hachyderm.io/tags/SwiftData" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>SwiftData</span></a> app, how can you determine whether or not your data is stored in your db or externally?</p><p>Where's it stored in a Document-based app on macOS?</p><p>Fun times from exploring an (unrelated) db migration issue.</p><p><a href="https://deirdre.dev/posts/swift-data-images/" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">deirdre.dev/posts/swift-data-i</span><span class="invisible">mages/</span></a></p><p><a href="https://hachyderm.io/tags/swift" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>swift</span></a></p>
Patrick McConnell<p>I restored my <a href="https://mastodon.social/tags/SwiftData" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>SwiftData</span></a> backing store via Time Machine today. Sometimes this stuff still works.</p><p>I keep corrupting the store by double clicking documents that open an older schema version from the trash. sigh.</p><p><a href="https://mastodon.social/tags/macOSDev" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>macOSDev</span></a></p>
Florian<p>Am I missing something, or are relationships in <a href="https://mastodon.social/tags/SwiftData" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>SwiftData</span></a> incredibly expensive? Inserting just 2,409 entries with a relationship takes 21s, compared to 0.5s without. Autosave is off, and I'm manually saving every 1,000 entries. What am I doing wrong?</p><p><a href="https://mastodon.social/tags/iOSDev" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>iOSDev</span></a> <a href="https://mastodon.social/tags/Swift" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Swift</span></a></p>
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" 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" target="_blank">#<span>iOSDev</span></a> <a href="https://iosdev.space/tags/VisionPro" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>VisionPro</span></a> <a href="https://iosdev.space/tags/visionOS" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>visionOS</span></a> <a href="https://iosdev.space/tags/SwiftUI" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>SwiftUI</span></a> <a href="https://iosdev.space/tags/SwiftData" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>SwiftData</span></a> <a href="https://iosdev.space/tags/IndieDev" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>IndieDev</span></a></p>