Get database from crashed iOS app - ios

I develop an iOS app and I send it to any beta tester. After 2 month app has a crash and now it doesn't work .
I need to get any information about log or better I need database. How can I get it ? I can connect to my Mac, but I don't know how to access to db data (if is it possible).
It's very important get database information.
Thank you.

In your device, you can access support directories only for applications compiled for development.
Connect your device to your computer. Having launched xcode, open 'Organizer' window (Window->Organizer). On the left hand side of the menu you will have your device displayed. Under your device, select 'Applications'. All the dev applications will be available there. Select the application you are interested in and click 'Download' at the bottom of the window. What happens - the support directories are downloaded. They are stored in bundle with extension '.xcappdata'. 'ctrl' click on the file and menu will give you an option 'Show Package Contents'. You will find there your sql database file.

You can either use XCode Organizer to download the application directory from the device, or if the tester is remote ask them to install a program like iExplore that lets you simply copy application directories off of the device to send to you.

Related

How can I see data inside an iOS app from Xcode?

An iOS app is supposed to remove all data when a user logs out of the app. This has been completed, but I am looking for a way to verify that there is no data left over in the app (SQLite, user preferences, etc.)
I cannot figure out how IO can link to the app from Xcode (or from somewhere else and "look" into the app after a user logs out and confirm that all data is gone.
Bryan
I cannot figure out how IO can link to the app from Xcode (or from somewhere else and "look" into the app after a user logs out and confirm that all data is gone.
You can download the directory that contains all the app's data:
Open the Devices and Simulators window in Xcode and connect to the device you want to examine.
You'll see a list of the apps that you've installed on the device. Find the one you're testing in the list and click on it.
Click the gear icon at the bottom of the list and choose Download Container....
Xcode will download a bundle named something like com.your.identifier 2018-12-17 14/18.28.448.xcappdata.
Find the downloaded bundle (you can choose where Xcode puts it) and control-click on it. Choose Show Package Contents. Finder will open a window showing you everything in the app's container.
In addition to just looking at the app container, you can also modify the container and install it on a device. This can be useful for testing. For example, you could modify or delete an important data file from the container and install it on a test device to test that your app gracefully handles an error situation. Or, if someone testing your app runs into a problem you can't reproduce, you can get a copy of the app container from them and install it on your own device.

How to access Xcode database from iPhone app

This is my first iPhone app. I'm using Xcode 7.3.
In the app I used this tutorial to create an sql database using the app (when the user gives permission by pressing a button, it creates the .db file).
Now I would like to know how I can download the database from the app.
Here is why:
The app will be downloaded on someone's device (not via the app store). It is supposed to collect data from a wearable device and store it in the database.
However I don't know how to access that data later on when I have the user's phone. Apparently the db lives in
/var/mobile/Containers/Data/Application/###/Documents
I read that one method is "jailbreaking." But I have never done that and this is not my phone I'm dealing with, it's a client's, so I don't feel comfortable hacking it. Is there another way? Possibly through the terminal (this is how I did it with the android app, using adb)?
Or is there another way I can go about saving the database so that it is accessible/retrievable?
The first answer is correct but incomplete :
Once you have download the Container, the extension is .xcappdata, so you need to right-click on it and select show the package.
Then browse into /library/Application support/ to find your database in .sqlite
You can try to connect the device to your Mac, then in XCode, go to Window, Devices, select your device and app bundle and click "Download Container...".
To see the database, you could use SQLite.

How to run iOS app in iPhone without USB connection to Mac

I have developed my first apple app and i wish to run it in iphone (its working well in XCode). By running in iphone i don't mean to connect it with mac and run with USB connection.
I mean something like there will be uuid of iphone and i upload my app some where and it can be run by Iphone user without any wire-connection to my MAC where i have app in xcode.
Is it possible to achieve by anyway? Is that way to achieve is free of cost ?
What I understand from you question is you want to distribute your application to others,
If you have apple developers account , you can use TestFlight ITunes Connect, where you can distribute upto 1000 users
Or you could use other free providers like,
Fabric
Hockey
I personally recommend Fabric , it's free, has lot of features
In your project set your distribution profiles in code signing options
Then click on product-->Build wait for a moment until it opens an Organizer window .
After opening organizer window select save for AdHoC deployment --> choose your organization--> select for all devices compatibility(if you are running with latest Xcode 7.3 version otherwise devices compatibility window won't appear) click next next.
Finally you can get an api file in the Organizer window. In that select the first api file which has recently you built -> click on export to your any finder location.
Then open your api file location in your Finder.
Then open your browser and open https://www.diawi.com and drag and drop your api in the specified field and wait until it reaches 100% to upload and click on send so that you can get a link. Now you can share your link.
Note: In iOS device he can install the api by using safari browser with the link we have shared

Deleting an Application from 8830

We have developed an application for 8830 Device and its working fine.
The problem that we are facing now is that, we are unable to delete the application from the device.
We selected the application, pressed the menu button, but dont find any delete option.
We went to the applications list, through advanced options, but surprisingly we dont see our application in that that applications list(By Deploying the same application in higher devices such as 9630 and 9550,9800) we see a delete option, by pressing menu and also see our application in the options->application list.
We went to modules, and identified the modules of the application, but there also we were not able to find the delete option in it.
We also tried using the blackberry desktop software too, but in vain, we dont find our application in that list too
** The current device we are using is not configured with any BES(We are registered with the BIS) And moreover, we are able to delete the yahoo messenger, gtalk, twitter from the mobile except our application(It just behaves like some shortcut).
Do we need to add some extra lines of code in any class so that it gets identified as an application.Kindly help on this.
Thanks in advance,
Dheeraj Jami
Usually when an application installed via BB Desktop Manager + .alx file or wirelessly (Browser + jad file) the application is listed in the applications list and can be deleted by end-user without any problems.
But if the application installed via javaloader or cod file created automatically via RIM SDK then the application won't be listed in the application list.
The working way to delete unwanted cod file(s) is using javaloader.exe that comes with JDE distribution package.
Connect your device to the desktop computer via usb-cable and type the command in command line, when you are in folder where javaloader.exe located:
javaloader -usb erase -f unwantedfile.cod
and press Enter
Do we need to add some extra lines of code in any class so that it gets identified as an application.
No, you don't. From my experience it just happens sometimes with BlackBerries. In this case the only way to get rid of it is to pull the battery out of the device. This action resets the device to its factory state (all apps installed by user will be lost).

Get data from user test on device to mac

I'm doing some user tests of my new iOS app and store some test data in a plist. When I do that in the simulator it is easy to get that file for further analysis on my mac, but how can I easily get it from a real device? This will only be used during testing and will not be part of the final version.
Possible ways I have read about but not tried (in hope to get some directions here first):
E-mail attachment
Enable file transfer to iTunes
Jailbreak (but don't want to)
Currently what I am doing is to NSLog it and copy and paste from Xcode into Excel, but this requires that the device is tethered to my mac.
Any experience or advice on easiest way to get this done?
I sometimes use iPhone Explorer to do this, because the plist file I want is not in my Documents folder. I use it to navigate to the files associated with my app on the device. Just connect your device to your laptop, run iPhone Explorer and then use it to locate the plist file you want and drag and drop it wherever you want.
You can save data from Organizer. Just click on your device and it'll show in right pane. Files from documents folder and possibly other folders can be saved.

Resources