Joseph Toronto Joseph Toronto - 4 months ago 28
iOS Question

Xcode 6 keeps renaming my app's directory in iOS8 simulator after each run.

I'm running Xcode 6 Beta 5 but this has been happening since the first beta. My app's directory in the simulator keeps being renamed after each run. It took me a while to figure this out. I'm using this to get the doc's dir reference.

NSString *folder = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,
YES) lastObject];

NSLog(@"Documents Dir: %@",folder);

Now for example on the first run it'll be:


Second run now it's:


Third run:


This is wreaking havoc with my app because it stores path references for certain files within the app. It's not that my NSLog statement is returning incorrect results, I verified this is what happening in Finder. It's changing the name every time. Has anyone seen this happen? Is this a "feature" that I'm misunderstanding?


Turns out Xcode 6 does in fact change the app's UUID every run, and I'm in the wrong for storing absolute paths.