My iphone app uses a SQLite database to store data. I have a table with a blob column where i store my images.
When i do an update i don't want to overwrite the user's database, i want to execute some sql scripts and inject new data if needed.
I have a utility app made for Mac that should make the sql scripts that will be run on the iphone.
I have the images stored as NSImages in my app but i have problems when i want to export the data as sql scripts(simple text files).
My files should have lines like:
Insert into Images(imageData) values ( ___IMAGE1_DATA___ );
Insert into Images(imageData) values ( ___IMAGE2_DATA___ );
Insert into Images(imageData) values ( ___IMAGE3_DATA___ );
the question is how could i serialize images data to my sql script in order to import the data correctly into the blob column?