My app has created several data files as development has progressed through the simulator. Their location is obtained by this function:
NSString *pathInDocumentDirectory(NSString *fileName) {
NSArray *documentDirectories = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,
NSUserDomainMask,
YES);
NSString *documentDirectory = [documentDirectories objectAtIndex: 0];
return [documentDirectory stringByAppendingPathComponent: fileName];
}
The files are now required on the devices as testing of the app is moving from the simulator to actual devices. I was under the impression that the location that I am saving these files to made them part of the bundle and that therefore they would be on the device at the point of the build. Apparently that is not the case as the files do not exist on the device, but are present in directories on my development machine. How do I transfer the data files from my current working environment to the devices? How do I make these files get transferred from the simulator to the device automatically as they are written by the program?