Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

supersv

macrumors newbie
Original poster
Apr 19, 2008
6
0
Hi,

Does anybody know how to make files inside an iPhone SDK app's directory survive simulator restart? The problem is Xcode puts the application under a random folder in ~/Library/Application Support/iPhone Simulator/User/Applications/ during each launch, and any files the app stored during the previous session are gone.

Thanks.
 

Littleodie914

macrumors 68000
Jun 9, 2004
1,813
8
Rochester, NY
Hi,

Does anybody know how to make files inside an iPhone SDK app's directory survive simulator restart? The problem is Xcode puts the application under a random folder in ~/Library/Application Support/iPhone Simulator/User/Applications/ during each launch, and any files the app stored during the previous session are gone.

Thanks.
I'm not really sure, I've wondered the same thing.

And on a related note, how is application going to be maintained after an application upgrade? :confused:
 

supersv

macrumors newbie
Original poster
Apr 19, 2008
6
0
I've got a temporary solution, to ease the debugging. The idea is to use external commands to copy files when application starts and store them away when it is about to terminate. It's kinda ugly, but it works.
 

supersv

macrumors newbie
Original poster
Apr 19, 2008
6
0
What does that matter if the DB file is blown away every time your app exits?

It is blown away only when Xcode reinstalls your app in the simulator. When the app eventually gets to a real device, files will stay.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.