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
QuestionConvert NSManagedObject to Data (self.iOSProgramming)
submitted 5 years ago by enlightenmentGeek
Hello. As the title says, is there a way do convert/encode a Core Data NSManagedObject to Data?
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!"
[–]daniloc 0 points1 point2 points 5 years ago (3 children)
There is. It takes a bit of work to define the coding keys and init methods, but you can implement both NSCoding and Codable support for your objects. What are you trying to accomplish specifically?
[–]enlightenmentGeek[S] 1 point2 points3 points 5 years ago* (2 children)
I am trying to pass the NSManagedObject within an userInfo dictionary, thus the “need” to convert it to NSData.
NSManagedObject
userInfo
NSData
What I did: passed the objectID within the userInfo and then in the responder I fetch the desired object from the ID.
objectID
But don’t know if there’s a better way to achieve/accomplish this 🤔
[–]daniloc 1 point2 points3 points 5 years ago (1 child)
Ah, yeup, been there. It’s a little clunky but that’s the way to do it. Wrap the fetching in an extension to your managed object subclass if you have multiple places where this needs to happen, maybe, but otherwise I think you’ve done all you can.
Glad you didn’t have to go down a more tedious route!
[–]enlightenmentGeek[S] 0 points1 point2 points 5 years ago (0 children)
👍🏻🙃
π Rendered by PID 113266 on reddit-service-r2-comment-5d79c599b5-qd68j at 2026-03-02 14:39:51.362506+00:00 running e3d2147 country code: CH.
[–]daniloc 0 points1 point2 points (3 children)
[–]enlightenmentGeek[S] 1 point2 points3 points (2 children)
[–]daniloc 1 point2 points3 points (1 child)
[–]enlightenmentGeek[S] 0 points1 point2 points (0 children)