Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

aleclerc

macrumors newbie
Original poster
May 15, 2009
6
0
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
Code:
NSURL *storeUrl = [NSURL fileURLWithPath:
    [[self applicationDocumentsDirectory]
        stringByAppendingPathComponent: @"Money.sqlite"]];
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?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.