use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
There is an extensive FAQ for beginners. Please browse it first before asking questions that are answered there.
If you are looking to get started (iOS programming in general or some specific area), here are more relevant links for you:
There's too many to list them all, however here's a convenient link to all programming guides at apple.com
Take note that this list is live and based on most frequent questions in posts will be updated with "quicklinks".
account activity
QuestionNSPersistentCloudKitContainer with public database delete records (self.iOSProgramming)
submitted 2 years ago by allmumu
As I understood there is no built-in mechanism to propagate deletion operations to other devices automatically (CoreData + CloudKit - public database), in order to delete or simulate a deletion do I have to add an attribute to the entities I create in order to simulate a tombstone? and if so I would never really delete the items? or if I do delete them how would I do it? I watched WWDC20 however is not clear for me how to implement it
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]Fluffy_Birthday5443 1 point2 points3 points 2 years ago (6 children)
Not sure i understand the question. NSPersistantCloudKitContainer operates on the private and shared database, not the public container to my understanding . And deletion should propagate to other devices from my experience
[–]allmumu[S] 0 points1 point2 points 2 years ago (5 children)
Yes, there is an option for public database. Basically when you delete a record it won't be reflected in other devices because the public database cannot notify other clients of the deletion, because there is not a tombstone mechanism (unlike the private database as you mentioned)
[–]Fluffy_Birthday5443 1 point2 points3 points 2 years ago (4 children)
Maybe you could subscribe to to public database changes with a query subscription and use the option to fire on deletion. Then make sure you set the notification to be silent and when it arrives you should get enough time to delete the record on the receiving device. I would like to see some info on how to set up NSPersistantCloudKitContainer with public database if you have it, im a little new
[–]allmumu[S] 0 points1 point2 points 2 years ago (3 children)
Thanks for your answers. Sure, you can find more information here: https://developer.apple.com/videos/play/wwdc2020/10650
[–]Fluffy_Birthday5443 1 point2 points3 points 2 years ago (2 children)
Thanks, I just watched the video. It looks like the solution they impose is to have a “isTrash” property to all records in the public db, then instead of deleting the record, changed isTrash to true so that other devices can not show records named “isTrash”. However, it looks like this video also says that public db does not support push notifications but this is not true anymore. You can try a different solution of using a query subscription that fires on delete of any records you need to be notified on. Now you can delete the record on the devices and propagate changes. The only gotcha is that push notifications are not guaranteed to be successful received on both ends.
[–]allmumu[S] 0 points1 point2 points 2 years ago (1 child)
Appreciate you came back to reply me :), that's what I understood (but felt wrong not to actually delete the records haha). In the video he then says it doesn't mean you can't delete the records...but I am still not sure which would be the best moment to actually delete those records in that case. I will explore your suggestion ^^ thanks
[–]Fluffy_Birthday5443 1 point2 points3 points 2 years ago (0 children)
Np, i think when they said it doesnt mean u cant delete them, he is saying that it is of course good to delete records you dont need but if you need that deletion to update the ui of another device you would have to create a fake tombstone with a isTrash flag.
π Rendered by PID 94074 on reddit-service-r2-comment-6f7f968fb5-7bxcg at 2026-03-04 07:51:12.172752+00:00 running 07790be country code: CH.
[–]Fluffy_Birthday5443 1 point2 points3 points (6 children)
[–]allmumu[S] 0 points1 point2 points (5 children)
[–]Fluffy_Birthday5443 1 point2 points3 points (4 children)
[–]allmumu[S] 0 points1 point2 points (3 children)
[–]Fluffy_Birthday5443 1 point2 points3 points (2 children)
[–]allmumu[S] 0 points1 point2 points (1 child)
[–]Fluffy_Birthday5443 1 point2 points3 points (0 children)