I've been developing for iOS since the beginning and I've run into some trouble. I started making an app that needs to create files and save them to the documents folder and application support, however the good ol' standard way of using the
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentsDirectory, NSUserDomainMask, YES);
NSString *filePath = paths[0];
Doesn't work. It keeps bringing up a different file path every time the app is launched.
I've searched on google about this and everyone so far seems to just say they have this problem on the simulator. However, this is not a problem restricted to the simulator, it happens on the device every time the app is started, regardless of whether or not you run it from Xcode or not. Other search results just tell me the old way of doing it and/or are from too many years ago.
Does anyone know the current way to write to the Documents and Application Support folders is? This is a problem compiling from Xcode 6.1, using the iOS SDK8.1, running on both iOS7.1 and iOS8.1
Any help would be appreciated