project structure for two-stage core data build
project structure for two-stage core data build
- Subject: project structure for two-stage core data build
- From: Matt Neuburg <email@hidden>
- Date: Wed, 27 Jan 2010 09:11:05 -0800
- Thread-topic: project structure for two-stage core data build
Here's my problem. Tell me how to structure my project to handle it. The
issue, in a nutshell, is that my data starts life as text files but in my
shipping app the data is expressed as a Sqlite database. So there are two
steps when I build my app:
Step 1:
I have a bunch of text files. I read them and parse them into a Core Data
in-memory store. Then I switch the store to a Sqlite store and save out the
database.
Step 2:
I build my real app. It contains the database - not the text files - and
uses pure normal Core Data Sqlite store procedures.
The way that I originally solved this problem works but isn't easily
maintainable. I didn't quite know where I was heading with this, so I didn't
plan very cleverly. I have just one target. What I did involved building and
running my single target twice, with adjustments to the code and the target
structure in between.
So, the first time, the text files were included in the target; I build and
run the app, the app starts up, reads the text files from inside its own
bundle, saves the Sqlite database, and quits. Then I remove the text files
from the target, add the database to the target, comment out a bunch of
code, uncomment some other code, and now we've got the target for the "real"
app that I ship.
So my real app depends upon a sort of "pre-app" that must not only be built
but must actually be *executed* in order to generate the database as an
intermediate product. How should I express this entire two-step dance as a
single build operation? Thx - m.
--
matt neuburg, phd = email@hidden, <http://www.tidbits.com/matt/>
A fool + a tool + an autorelease pool = cool!
AppleScript: the Definitive Guide - Second Edition!
http://www.tidbits.com/matt/default.html#applescriptthings
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden