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:

271
active users

#coredata

0 posts0 participants0 posts today
Aleksander Stojanowski<p>If that fails, I’ll switch to <a href="https://iosdev.space/tags/CoreData" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>CoreData</span></a>, as there are much more materials on how to deal with it, not to mention it’s a mature framework. Now it’s time to at last rest before the new week! ☺️<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/IndieDev" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>IndieDev</span></a> <a href="https://iosdev.space/tags/iOSDev" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>iOSDev</span></a></p>
Aleksander Stojanowski<p>All that made me think, maybe <a href="https://iosdev.space/tags/CoreData" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>CoreData</span></a> would be a better choice, but at this point I’m a bit afraid to change everything. On the other hand, it’d be better to do it now than after the official release, I guess.<br><a href="https://iosdev.space/tags/Swift" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Swift</span></a> <a href="https://iosdev.space/tags/iOSApp" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>iOSApp</span></a> <a href="https://iosdev.space/tags/AppDevelopment" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>AppDevelopment</span></a></p>
Axel Le Pennec<p><span class="h-card" translate="no"><a href="https://mastodon.social/@helge" class="u-url mention" rel="nofollow noopener noreferrer" target="_blank">@<span>helge</span></a></span> <span class="h-card" translate="no"><a href="https://hachyderm.io/@groue" class="u-url mention" rel="nofollow noopener noreferrer" target="_blank">@<span>groue</span></a></span> <span class="h-card" translate="no"><a href="https://mastodon.social/@fatbobman" class="u-url mention" rel="nofollow noopener noreferrer" target="_blank">@<span>fatbobman</span></a></span> both async functions are isolated to the same actor (queue?) but it doesn’t mean they will be running on the same thread right? Passing non-Sendable type is ok but I thought the issue with <a href="https://iosdev.space/tags/CoreData" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>CoreData</span></a> NSManagedObject and <a href="https://iosdev.space/tags/SwiftData" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>SwiftData</span></a> Model was that they can’t be passed between threads. Which seems to be the case with two async functions in a ModelActor.</p><p>What do you think <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>?</p><p>Thanks!</p>
Duncan Babbage<p>So... I’ve traced my performance issue down to the way I’m updating my main SwiftUI lists in response to incoming `NSPersistentStoreRemoteChange` <a href="https://iosdev.space/tags/CoreData" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>CoreData</span></a> notifications from iCloud. I was processing them on a background context, then sending notifications observed by lists. If they displayed types that were updated they’d refresh.</p><p>Clearly I was not doing this well because the view-side-subscription-and-refresh part could cause multi-second UI pauses. Obv not great.</p><p>Advice welcome. <a href="https://iosdev.space/tags/iOSDev" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>iOSDev</span></a></p>
Duncan Babbage<p>It’s pretty easy to define a <a href="https://iosdev.space/tags/SwiftLang" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>SwiftLang</span></a> OptionSet &amp; then store it in a <a href="https://iosdev.space/tags/CoreData" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>CoreData</span></a> Int using a custom getter and setter. </p><p>Testing suggests it’s possible to fetch based on specific option, i.e. NSPredicate like:<br>`NSPredicate(format: "(%K &amp; %i) != 0", “options”, myOption.rawValue)`</p><p>…which works great till app crashes during iCloud sync with something like: "Exception was caught during Core Data change processing. [snip] Can't do bit operators on non-numbers with userInfo (null)”</p><p>Thoughts? <a href="https://iosdev.space/tags/iOSDev" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>iOSDev</span></a></p>
Duncan Babbage<p>Anyone got any insight into <a href="https://iosdev.space/tags/CoreData" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>CoreData</span></a> <a href="https://iosdev.space/tags/iCloud" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>iCloud</span></a> sync issues when running TestFlight builds?</p><p>When running dev builds, everything was syncing rapidly between two physical devices. Now with TestFlight builds on three devices, which should be syncing to production iCloud, seeing initial sync but not seeming to sync further updates. </p><p>Hmm, I presumed that I couldn’t attach a debugger to a TestFlight build… but perhaps that’s wrong? <a href="https://iosdev.space/tags/iOSDev" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>iOSDev</span></a></p>
Duncan Babbage<p>Can someone please explain to me the right hand side of the equality `ShoppingItem.entity().name == change.changedObjectID.entity.name` in the code shown in the screenshot?</p><p>In this code, `change` is an `NSPersistentHistoryChange`, and `changedObjectID` is an `NSManagedObjectID`. Is there some magic way to access an entity from managedObjectID.entity that I am unaware of? NSManagedObjectIDs don’t have properties or methods you can call on them as far as I’m aware? <a href="https://iosdev.space/tags/CoreData" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>CoreData</span></a></p>
Helge Heß<p>So, here we go, the adjusted RealmVsSwiftData test w/ a <a href="https://mastodon.social/tags/CoreData" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>CoreData</span></a> suite added. Took me longer than anticipated 🙂 Suggestions are welcome.<br>CoreData seems to be roughly twice as fast as <a href="https://mastodon.social/tags/SwiftData" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>SwiftData</span></a>, but as expected still very slow. E.g. inserting 1m simple records takes ~1.15 *hours* (vs 2.75h in SwiftData, 6.5s in Realm and 8.2s in Lighter).<br>The SwiftData test for updates (renames) still needs to be fixed, the original implementation is incorrect.<br><a href="https://github.com/Data-swift/RealmVsSwiftData/tree/feature/coredata-support" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">github.com/Data-swift/RealmVsS</span><span class="invisible">wiftData/tree/feature/coredata-support</span></a></p>
Duncan Babbage<p>A reason to argue against the observed object setup being the issue though is that separate tabs that have separately used @FetchRequest to obtain a list of entities, one of which is being handed down to these subviews, *do* correct update across tabs (close to) immediately when one is updated. So the changes are being received from the view context.</p><p>So I guess I'm back to—why isn't my view context being updated correctly in <a href="https://iosdev.space/tags/SwiftUI" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>SwiftUI</span></a> when <a href="https://iosdev.space/tags/CoreData" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>CoreData</span></a> syncs in changes from iCloud? 🤔</p>
Duncan Babbage<p>Would love any leads on this: setting .fetchBatchSize causes entire collection to be immediately traversed <a href="https://developer.apple.com/forums/thread/756853" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">developer.apple.com/forums/thr</span><span class="invisible">ead/756853</span></a> <a href="https://iosdev.space/tags/WWDC" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>WWDC</span></a> <a href="https://iosdev.space/tags/CoreData" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>CoreData</span></a></p>
Ramesh #NotGoingBack<p>New in <a href="https://mastodon.social/tags/SwiftData" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>SwiftData</span></a> this year: <a href="https://mastodon.social/tags/CustomDataStore" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>CustomDataStore</span></a>, going beyond the default <a href="https://mastodon.social/tags/CoreData" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>CoreData</span></a> store of last year to <a href="https://mastodon.social/tags/SQLite" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>SQLite</span></a>, <a href="https://mastodon.social/tags/RemoteWebService" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>RemoteWebService</span></a>, or even custom mapped <a href="https://mastodon.social/tags/JSON" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>JSON</span></a> files, with full support for <a href="https://mastodon.social/tags/historyTracking" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>historyTracking</span></a></p>
Keith Sharp<p>My number one wish for <a href="https://hachyderm.io/tags/WWDC24" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>WWDC24</span></a> is to be able to configure <a href="https://hachyderm.io/tags/SwiftData" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>SwiftData</span></a> to turn off Write Ahead Logging, something like:</p><p>let config = ModelConfiguration(url: storeURL, walEnabled: false)<br>let container = try ModelContainer(for: Item.self, configurations: config)</p><p>which would be the same as <a href="https://hachyderm.io/tags/coredata" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>coredata</span></a> </p><p>let description = NSPersistentStoreDescription(url: storeURL)<br>description.setValue("DELETE" as NSObject, forPragmaNamed: "journal_mode")<br>container.persistentStoreDescriptions = [description]</p>
Keith Harrison :clubtwit:<p>Silencing the Core Data CloudKit sync debug messages that fill the Xcode console <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/CoreData" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>CoreData</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://useyourloaf.com/blog/disabling-core-data-cloudkit-logging/" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">useyourloaf.com/blog/disabling</span><span class="invisible">-core-data-cloudkit-logging/</span></a></p>
Axel Le Pennec<p>With a <a href="https://iosdev.space/tags/SwiftUI" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>SwiftUI</span></a> SectionedFetchRequest, is there a performance difference between using a stored attribute vs a computed variable marked as objc?</p><p>My thinking is that the stored attribute uses a GROUP BY SQL statement whereas the computed loads all objects in memory? Is that correct <span class="h-card" translate="no"><a href="https://xoxo.zone/@numist" class="u-url mention" rel="nofollow noopener noreferrer" target="_blank">@<span>numist</span></a></span>?</p><p><a href="https://iosdev.space/tags/CoreData" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>CoreData</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/iOS" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>iOS</span></a></p>
Axel Le Pennec<p>Given a key path to an attribute on my model and a predicate to filter the elements, the @ FetchRequest/Query property wrappers should be able to return the sum/median/average/min/max/etc. whenever the underlying data changes (insert/update/delete) this refresh the <a href="https://iosdev.space/tags/SwiftUI" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>SwiftUI</span></a> View.</p><p><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/CoreData" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>CoreData</span></a> <a href="https://iosdev.space/tags/iosdev" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>iosdev</span></a></p>
Axel Le Pennec<p>I really hope we'll be able to use function expressions in FetchRequest/Query/NSFetchedResultsController.</p><p>I often use sum/average/min/max on my data using <a href="https://iosdev.space/tags/CoreData" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>CoreData</span></a> notifications to dynamically re calculate the values based on store changes. We need a built-in way!</p><p><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/SwiftUI" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>SwiftUI</span></a></p>
Roman Lefebvre<p>Checking my crashlogs in the run up to <span class="h-card" translate="no"><a href="https://indieapps.space/@sequel" class="u-url mention" rel="nofollow noopener noreferrer" target="_blank">@<span>sequel</span></a></span> 2.1 release. You know, to make sure there's nothing worrying in there. Well, someone in the Core Data team sure killed my optimism 😂</p><p><a href="https://mastodon.design/tags/CoreData" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>CoreData</span></a></p>
Helge Heß<p>I think a key flaw of both <a href="https://mastodon.social/tags/SwiftData" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>SwiftData</span></a> and <a href="https://mastodon.social/tags/CoreData" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>CoreData</span></a> is that they impose their own proprietary SQL schema.<br>If it‘d worked on top of the plain SQL catalog (and EOF did), you could use it for more complex editing scenarios but still hit the DB w/ Lighter or GRDB for other things.</p>
BillySangster<p>Spent the last week or so migrating a fairly sizeable project using CoreData to SwiftData. Kinda partially moved away from MVVM architecture as well.<br>A few headaches along the way and quite a few things left to iron out, but happy with it on the whole.</p><p><a href="https://mastodon.scot/tags/iOS17" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>iOS17</span></a> <a href="https://mastodon.scot/tags/SwiftData" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>SwiftData</span></a> <a href="https://mastodon.scot/tags/CoreData" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>CoreData</span></a> <a href="https://mastodon.scot/tags/Apple" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Apple</span></a> <a href="https://mastodon.scot/tags/SwiftUI" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>SwiftUI</span></a> <a href="https://mastodon.scot/tags/Swift" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Swift</span></a></p>
kkla320<p>Some thing that I really dislike about <a href="https://troet.cafe/tags/SwiftUI" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>SwiftUI</span></a> is the provided build in integration with <a href="https://troet.cafe/tags/CoreData" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>CoreData</span></a> or <a href="https://troet.cafe/tags/SwiftData" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>SwiftData</span></a>. The coupling of persistence and UI is a violation of separation of concerns. </p><p>When you want to change your persistence you need to change your UI.</p>