Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Programming > iPhone/iPad Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Apr 2, 2011, 05:54 PM   #1
portreathbeach
macrumors member
 
Join Date: Feb 2011
Reading and writing files and storage locations xcode

Hi,

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

Craig
__________________
iMac 24, macBook Pro 15" hi-res, macMini (media server), iPhone 4, Qnap NAS 2TB
portreathbeach is offline   0 Reply With Quote
Old Apr 2, 2011, 06:22 PM   #2
robbieduncan
Demi-God (Moderator)
 
robbieduncan's Avatar
 
Join Date: Jul 2002
Location: London
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).
robbieduncan is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > iPhone/iPad Programming

Tags
csv, reading, writing, xcode

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
thread Thread Starter Forum Replies Last Post
Reading and writing to file farmerdoug Mac Programming 7 Feb 5, 2011 09:30 AM
Read and Write to file, from Widget? allegutta Mac Programming 0 May 4, 2010 12:07 PM
Reading and writing Windows and Linux file formats under Mac OS - what works? Mr.Bullitt Mac Basics and Help 3 Nov 26, 2009 08:53 AM
Cannot Read of Write Files -- Time Machine BeefCurten Mac OS X 0 Oct 20, 2008 10:20 PM
Cds read and write, Dvds get spat out... londonweb Macintosh Computers 7 Sep 19, 2005 01:20 PM


All times are GMT -5. The time now is 05:20 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

Privacy / DMCA contact / Affiliate and FTC Disclosure
Copyright 2002-2013, MacRumors.com, LLC