-
Notifications
You must be signed in to change notification settings - Fork 87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Save data for coredata #44
Comments
You can save (nearly) anything you like into the keychain using Lockbox, but you'll have to write your own code to call the Lockbox methods to do so. You may instead want to combine iCloud with your CoreData store. After a bit of setup, and without any other specific changes to save the data in general, the data you want to persist across app deletion remains in iCloud. Then you need only detect that you can restore it from iCloud, and viola! The keychain isn't really the place to accomplish this, but you can certainly use it for that purpose if you must. |
Thank you sire for your replay. I am fetching data from lockbox to store it in coredata. but i am not able to set it as object for key. because it will not find any key. How can i achive this ?
I am getting data in this fom in lockbox : <__NSArrayI 0x7fab3be54710>( |
I don't think the issue here is with |
yes. data comes properly from lockbox. But i am not able to fetch it in string with "objectforkey" . I have tried several method,s but after coming from lockbox it will not find "objectforkey". Moreover , I have tried it with setting simple dictionary with single key but still when debugger reached at "objectforkey" I am getting this type of error . |
Hmm... I just created some unit tests locally to see what's happening here, and there does seem to be an issue, undoubtedly related to saving an array of dictionaries. I'll look into it. |
The crux of the issue is that nesting complex types is a bad idea at the moment. You'd be better off persisting your array of dictionaries to a plist on disk or in iCloud if you need persistence across app deletes. The solution for this is non-trivial. I'll have to give it some thought before I dive into it. |
I am working on rss feed based project. I am saving data which entered by user in coredata. is it possible to it also save in lockbox like [Name , websitename , feedurl]
and when user uninstall app and install again then data will be copies from lockbox to coredata ?
Here is my method for save coredata .
The text was updated successfully, but these errors were encountered: