Loading files from the simulator.

Discussion in 'iOS Programming' started by detz, Aug 8, 2008.

  1. detz macrumors 65816

    Jun 29, 2007
    So I have txt files that are saved on the filesystem and I'm able to read/write these fine but the problem is the simulator changes paths every time it's run. Is there a way to force it to use the same path so I don't have to copy these files to the new location every time?
  2. kainjow Moderator emeritus


    Jun 15, 2000
    Drag the files into the Resources group in your Xcode project. Then you can access them via [[NSBundle mainBundle] pathForResource:mad:"somefile" ofType:mad:"txt"]

Share This Page