|Apr 2, 2011, 05:54 PM||#1|
Reading and writing files and storage locations xcode
I am writing an iPhone app that is going to be using 15 or more dictionaries each containing about 15 arrays. These are basically tables of data. Instead of entering all of the data into the arrays from within xcode, I want to use Excel and export the data as .csv files.
My question is, where do I put the .csv file and how do I reference it in xcode.
If I save it, to say, the root of my hard drive, I can set the path to the file and open it from the iOS simulator, but what if I upload the app to the app store, the path is not going to be correct.
Where and how do I reference the file.
Thanks in advance
iMac 24, macBook Pro 15" hi-res, macMini (media server), iPhone 4, Qnap NAS 2TB
|Apr 2, 2011, 06:22 PM||#2|
If the data is static the it should be in your applications resources (and you use the standard NSBundle methods). If it's not static then it should be in your applications sandboxed document area (and you'll have to find some way of getting it there so a copy will probably have to start in your applications resources) and you use the well documented method to get the documents folder (NSSearchPathForDirectoriesInDomains)
This is basically all covered in the ISO Application Programming Guide that all iOS developers should have read and understood all of before starting to think about any application.
Edit to add:this is 100% absolutely nothing to do with XCode which is just an IDE and everything to do with the API (Cocoa Touch) and the runtime (iOS).
Sponsor me to cycle 100Km round London in the dark
|csv, reading, writing, xcode|
|Thread Tools||Search this Thread|
|thread||Thread Starter||Forum||Replies||Last Post|
|Blu-ray reading/writing software||axisD||iMac||9||Apr 14, 2014 03:36 PM|
|I can hear my system reading and writing||Jpeppard||MacBook Air||5||Oct 21, 2013 04:44 AM|
|Retina screen for writing and reading||Divegent||MacBook Pro||19||Jul 27, 2013 11:35 AM|
|Free app for offline reading (only reading ) PDF, WORD, EXCEL, PPT files||Subu||iPhone and iPod touch Apps||0||Feb 21, 2013 10:43 PM|
|Reading/Writing to NTFS?||micrors4racer||OS X||8||Jul 21, 2012 01:37 PM|
All times are GMT -5. The time now is 03:29 PM.