Get app data from Appstore build - ios

I want to be able to plug in any device that has my App on it and download the app data for my application. Is that possible?
I have a device that has the app store version of my application and I want to get the application data off of it.
I plugged in a device that is not added to my development account. I then add it to my dev account by going to Xcode organizer, selecting the device in the left-hand pane, and then clicking "Add to Member Center". After the whole process completes, I click Applications, but I don't see the existing app store version of my application available.
I then try to run my application on my device and it ends up deleting the existing App store version which causes all the data to be lost. Is there a way to get the existing app store app data off of the device?
===== edit ====
I'm looking to get the data manually, like I would if I had the app available as one of the options in the Applications tab underneath the device name in Xcode Organizer.

Related

How do I test code that runs on update for IOS apps?

My app contains code that must modify the DB in the documents directory on update of the app (because the structure of the DB has changed between versions).
The loading of the new version of the app to a phone via xcode works fine, and runs the code correctly. However I'm concerned that this may not exactly mirror what happens when updating via the app store on the phone.
In order to properly test that this code runs correctly when a user updates their app through the app store, I gather it used to be possible to load the app via an ad hoc distribution, which would install it as if it were an update from the app store. The (rather old) instructions for that are here:
https://developer.apple.com/library/archive/technotes/tn2285/_index.html
I attempted this, by exporting the ad hoc .ipa file and dragging onto the device in ITunes, only for it to tell me the app is already installed. The .ipa file contains the updated app and it has a higher version number than the one installed on the device.
Do I need to do this another way? Or is loading the app via xcode sufficient to emulate what the user's phone will do when updating the app?
Thanks

How to track production app bugs/crashes from all devices in iOS without using any third party libraries

I have one requirement like I have to track all the bugs and crashes from my production app of App Store from all devices.
I have idea tracking bugs or crashes by using Crashlytics library by integrating to my iOS project. And I have seen some other libraries too to achieve this.
But, my requirement is without using any third party library, I have to achieve this task.
And I know printing all the logs inside the apps and forwarding them to server by API call, but, if application gets crash app can't execute any code except Terminate delegate method. Even though we can't able to call the api request.
Can anyone suggest me, how to achieve this? I want implement this in Swift.
Finally found the answer from Apple docs.
About Crashes organizer
Use the Crashes organizer to view crash reports generated by the report service for apps that you distribute using TestFlight or distribute through the App Store.
Important: For apps released in the App Store, the user must agree to share user crash and energy data with developers. (TestFlight users automatically share these logs with developers.) Only the Team Agent or Admin role, or an App Store Connect user can view these reports.
To view crash reports, choose Window > Organizer, then click Crashes. Xcode begins refreshing the crash reports for the selected app version, including embedded app extensions. Xcode downloads the top crash reports—crash reports with the most number of occurrences on unique devices—that occurred during the past two weeks. However, there may be up to a one-day delay between when you first distribute your app and when crash reports are available in Xcode.
For more information, check here by clicking this link
https://help.apple.com/xcode/mac/current/#/dev861f46ea8
as per my knowledge if you have created an archived build from your machine and uploaded it to app store then you can open Windows -> Organizer from Xcode tool options, then in Organizer you can select the Crash tab at the top, you can see its automatically downloads the crash information if it has linked with developer account. Also in itunes connect also you can check the reports.

When you build an iOS app for testing, can you have it end up in a folder?

This has been a really difficult question to Google: When you click on build, and Xcode puts the app on your physical iPhone, is there a way to force that app into a folder, rather than just the first open spot on the springboard?
No. There is no way to tell Xcode where to install the app on your iOS device the first time you send the app to the device.
Of course after the initial installation you can put the app where you want it on the iOS device and then it will stay there each time you update the app through Xcode. But if you remove the app from the iOS device and then do a build through Xcode, the app will get put in the first open spot again.

Read console/errors of iPhone app without new build via Xcode

I developed an app and already tested it in Xcode and on my physical iPhone device.
After a lot of testing on my iPhone the app quits after starting.
I guess this is because of an empty array, but I am not sure.
Is there a possibility to read the console of my already built app on my iPhone? Because when I am testing the app on Xcode everything works fine - I guess the error occurs in only very specific cases...
I don't want to build the app again on my physical device, because I am pretty sure everything works fine then and I won't be able to recreate the exact situation.
So I would like to connect the phone to my macbook and run the app on my phone in Xcode without rebuilding it first.
Any ideas?
Connect your phone to your system and open Xcode.
The Window menu in Xcode Select Device and Simulators from the
Window menu.
Select your device from the left panel.
The toggle logs button Make sure that the logs are expanded. If they
are not, press the small up arrow in the bottom left corner of the
main pane.
Click the Save Console button (at the bottom right) to save the log
information within the console.
If you use a free Apple Developer account it is normal, it has not crashed.. it simply refuse to run.
Apple has imposed 'new' limitations on the 'free' provisioning profiles, whit this limitations you can run the app on a physical device for 7 days, then you must recreate a new profile with a new deploy on the device.
Even without XCode you can get the logs by using iOS Console which is free and works exactly as XCode's console.
As for starting the app again without rebuilding from XCode, you can use ⌃⌘R to speed up your tests.

How can i export app file in Xcode

Do you know how to export app file in Xcode?
(like .apk file in android)
I want to send my testing app to someone for feedback.
i have never tried it before. please let me know easy way to export app file.
(not all project, only a file which can be played in another iPhone)
First Archive it (XCode->Product->Archive).
(For Archive button to be in visible state : either your device should be selected or generic ios device should be selected, incase any simulator is selected archive button will be disabled.)
A Window will appear :
Choose Export->AdHoc.
.ipa will be generated.
u can use https://www.diawi.com/ for uploading and send app to anyone.
I am posting a very late response to this old question in case anyone else finds their way here and infers that it isn't possible to export an app to your own iPhone or iPad without a developer account. That isn't true. I unearthed these posts when looking for an answer to the same question, and initially read them that way.
If you want to test an app you have written in XCode on your own iOS device you do not need a developer account. Provided the device you wish to test it on (or share it with) is physically nearby so that you can connect it to your macOS device to pair with it as a trusted device, it will remain paired when physically disconnected and accessible over a shared network by WiFi. You can build and run apps from XCode on to the iOS destination device and they will remain in place there and executable afterwards. There is a limit to how many exported apps there can be at one time, which seems to be 3.
Apple explain how to do all this here. You do need to have a registered App Store account, but that's the same one you use to buy apps and build projects in XCode, and it's free unless you want to distribute your app through the App Store.

Resources