Looking into app folders during iPhone development
My app creates folders on the iPhone, stuffs files into them, moves them around, and so on. I'm trying to debug some hiccups in this behavior, but am finding it hard to see what's actually going on with the files and folders. Is there a way I can look into the folder hierarchy of the iPhone simulator or of a dev-tethered iPhone at all like I could with开发者_JS百科 Finder or a command prompt on my mac?
Yes, the files will be in the simulator's workspace. They're located at the following path:
~/Library/Application Support/iPhone Simulator/<version>/Applications/<uuid>/
For version, choose the version number of the iOS version you installed your app to in the simulator (e.g., 4.2). When your app is installed in the simulator, each app is given some GUID, so look in each of these until you find the app you're testing. Under that directory will be what your app sandbox will look like on the phone. You can see all the files that your app created in the simulator there, and you can watch them in Finder or whatever you'd like.
Be aware, however, that each time you hit the 'Build and Run' command targeting the simulator, a new GUID will be generated and your app will be relocated to that directory. This is similar to what happens when the user updates your app on the phone.
精彩评论