I\'d like to analyze the data that I have in my iPhone app after doing some tests, and the data is in a SQLite database. Is there any way for me to be able to copy it off of
In Xcode 6 this is available at:
Window -> Devices -> -> Installed Apps.
Select your application.
Click the gear icon -> "Download Container"
If this is your own application you can enable Application supports iTunes file sharing
(UIFileSharingEnabled) in your applications plist and your database is stored in your documents directory of your application you will be able to easily access your database through iTunes.
UIFileSharingEnabled (Boolean - iOS) specifies whether the application shares files through iTunes. If this key is YES, the application shares files. If it is not present or is NO, the application does not share files. Applications must put any files they want to share with the user in their /Documents directory, where is the path to the application’s home directory.
In iTunes, the user can access an application’s shared files from the File Sharing section of the Apps tab for the selected device. From this tab, users can add and remove files from the directory.
This key is supported in iOS 3.2 and later.
Other Options:
Jailbreaking your phone, adding afc2add through Cydia and then using some type of iPhone Explorer application.
Jailbreak your phone and install ssh and use a tool such as CyberDuck.
There are windows alternatives to both of those applications.
You don't need to turn on file sharing in the app to get this, you can get the data for any app you've built via Xcode's devices window.
In recent versions of Xcode (8 and up, I think), open this with Window
menu --> Devices
. Find the device in the device list and look at the installed apps list for the device. Each app that you've built and installed on the device will be listed (and maybe some others). Select your app and click the gear menu below the list. Clicking the "Download" item on the pop-up menu will enable you to copy the app's documents, library, and other directories to your Mac.
NB: This will download an .xcappdata file. Right-clicking on that and selecting "Show Package Contents" will allow you to drill down to the actual sqlite file.
You can also use iExplorer (for Windows or Mac, free version available) to browse and copy data on the iphone, without needing to jailbreak it.
If your iPhone is jailbroken, you can access it through SSH. A program like WinSCP (on Windows) can allow you to connect to the phone and give you filesystem access. Then you can navigate to where your application stores the DB.
There are also multiple Filesystem applications out there that might allow you to do this, but I don't think they will give you the full extent if your phone is not jailbroken.
You can also use iMazing (for Windows or Mac, free version available) to browse and copy data on the iphone, ipad or ipod