I've been following Core Data, Part 5: Prefilling Data but I feel like there's something missing.
If you're not familiar, it's basically telling me to create another program that's a db filler with the same xcdatamodel, and use a csv file to fill it up. Then I'm supposed to copy the .sqllite file I created to my original project.
It suggests changing the
in the prefilling program to match the sqlite file that my 'real' product should have.
So I let it run in simulator and get a .sqlite file in the ~/Library/Application Support/iPhone Simulator/User/Applications/{appid}/Library
and put it in my "real" project bundle, but it's not reading the file from the bundle. I have a feeling I'm missing something here, like having to copy over that .sqlite file to my new application directory by code or something. Does anyone have any suggestions?
If you're not familiar, it's basically telling me to create another program that's a db filler with the same xcdatamodel, and use a csv file to fill it up. Then I'm supposed to copy the .sqllite file I created to my original project.
It suggests changing the
Code:
NSURL *storeUrl = [NSURL fileURLWithPath:
[[self applicationDocumentsDirectory]
stringByAppendingPathComponent: @"Money.sqlite"]];
So I let it run in simulator and get a .sqlite file in the ~/Library/Application Support/iPhone Simulator/User/Applications/{appid}/Library
and put it in my "real" project bundle, but it's not reading the file from the bundle. I have a feeling I'm missing something here, like having to copy over that .sqlite file to my new application directory by code or something. Does anyone have any suggestions?