0

i have the sqlite db and want to convert into core data model. i also have a look at SqliteToCoredata given in githhub but unable to use properly. so is there any easy way to do that conversion. additionally i also have csv file. is there any way to convert csv file to core data model.

1 Answer 1

1

Of course there's a way. There just isn't any automatic way. You'll need to

  1. Load your existing data
  2. Iterate over each entry
  3. For each entry, create a corresponding managed object.

If you're using CSV, you can load the file into an NSString (if it isn't too big) and then iterate over each line. If you're using SQLite, you'll need to use either the SQLite API or one of the ObjC-style wrappers like FMDB or PLDatabase.

Sign up to request clarification or add additional context in comments.

1 Comment

works like a charm... converted 9 mb sized db to core data

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.