I am trying to see if cache files are successfully created but can't find their location on the disk (neither on simulator nor iPhone device)
Any ideas?
They are located in
${APP_DIRECTORY}/Library/Caches/.CoreDataCaches
Related
I created an sqlite file[or any file] in documents directory in ios device.If i removed the app (delete) from the device this file stays or get removed?
The sandbox of an application deletes automatically when you delete the app. It happens in both your device and in iOS simulator.
Documents directory allows you to store files and subdirectories your app creates or may need, for example a database.
Your application works in a sandbox environment. When you delete the application in simulator or device, the directory that was created by application is deleted and so do the files residing in it.
When you reset your simulator you can find the deleted files in the trash.
I have build an iPhone project on my IOS device. I used core data for storing some datas. When i build, it is woking. I just need to locate this .storedata file and when i traced, the location is /var/mobile/Applications/211B3C9E-82B3-4304-90D2-EE5E4337D9F1/Documents/MyProject.storedata. I opened all the hidden files in the machine but i am unable to locate the specified path for the device. I could locate the file when i build it in simulator. Can anyone suggest me some way to locate this file?
If you're running it on the device then you're creating the database on the device. You need an iPhone file explorer (I use iFunBox).
After updating my XCode to version 4.4 it seems to be impossible to retrieve Application Data from my devices.
In Xcode 4.3 (and all previuos version) I downloaded my Application Data (like SQLite databases and files I created) through the organizer (Organizer -> Devices -> "Device" -> Applications -> "Application" -> Download).
With Xcode 4.4 i get an error ("Permission Denied") when I try to download the Documents from the sandbox.
Is there anything new (maybe a new setting?) I have to change to obtain the Application Data from my device again?
Temporary fix is using itunes to get the files from the document folder.
In your .plist -> Information property list -> add:
UIFileSharingEnabled (YES)
Rebuild and go to itunes and get the files from document folder.
I am having the same problem and will give a little more information:
Even though Xcode gives the "Permission Denied" error, it does export two files into a xcappdata file and does not even export the "Documents" folder.
AppDataInfo.plist
com.apple.PeoplePicker.plist
Then I deleted the app and all data off the device and reinstalled it using Xcode. I exported the data after running the app and generating a log (log saved into the documents folder). This new log file was properly exported inside the "Documents" folder, but Xcode still generated the "Permission Denied" error.
After further running the app and generating logs, attempting to export the new data resulted in identical exports as the the first export after reinstall.
This bug appears to be fixed in Xcode 4.4.1
I have been temporarily mounting Xcode 4.3.3 from a disk image and using Organizer there. Not the best solution, but seems like an "okay" workaround.
UPDATE: seems to be fixed in Xcode 4.4.1
I'm seeing this problem also with Xcode 4.4, used iExplorer to get the files, someone else said PhoneView should should also work.
Sorry for late reply for this question. I thought its worth putting up if anyone comes across this situation. The best way to get hold of the data is by directly accessing application folder by using an Application called "iPhone Explorer" or "iExplorer" both are free and will let you directly access iOS device file structure and you can copy Documents folder from it.
Hope it helps. Thank you :)
I have created a sqlite database. and dragged it on to my projects resource folder.
In my project i am accessing a sqlite file from
/Users/user12/Library/Application Support/iPhone Simulator/4.3.2/Applications/1F219005-A4ED-4794-81FC-65EEF8D243EF/Documents/db.sqlite
I am not using the sqlite file that was added to the project. and my project is accessing the DB file from the above location.
So, now when i try to launch my application from a different mac i am unable to launch the application because the DB is not found in that path. So how could i solve this ?
note: i used FMDB.
My final objective is to give this application to my client and since he will be running the app on his iPhone, he should be able to access the sqlite file with no issue. So what changes should i make ?
Surely xcode in other machine will have a different path. Try to place the sqlite file at the app path created by xcode on the new machine.
EDIT:
To do what you've said in your comment i suggest to create an ad-hoc certificate. Then use xcode to create your archive.
But the path of your sqlite file should be in your main bundle.
ps: You need the UDIDs of your client iPhones to add the devices to the portal.
I have an iPhone application that downloads images into the Caches directory on an as needed basis. However, I'd like to provide a portion of those images pre-cached. Is there a way through XCode to define a "Library/Caches" folder that will copy into the Library/Caches folder found in The Application home directory on the iPhone - so I can build them in at build time? Or do I need to put them in as a resource, and then have my app copy them to the Cache on start?
You'll need to copy them from your app bundle to the caches on first run startup.