Is it possible to run instruments an App without being connected to Xcode?

I'm currently supporting an app where one of the dependencies we use had an update. The app is an iPad only app that is meant to be run as a kiosk (guided access, single app mode). After the dependency update for the casing of the tablet / kiosk, we noticed an uptick in errors that may or may not have been associated with the recent 3rd party software update.

I wanted to verify if the update had an impact on our production kiosks. To get a good idea of whether or not the update for casework's library had a negative impact, though, I would need to run instruments on a tablet while it's in the case. There's only one power cable to the iPad and the cable that would be used to connect directly to a Mac / Xcode is the same cable that connects to the casework.

Is it possible to run instruments, and then retrieve data, from an app that's not directly connected to Xcode? Or is it possible for Xcode to somehow connect via a running instance of an app remotely?

Answered by Developer Tools Engineer in 789089022

I'm not sure I correctly understand your question, so please let me know whether I'm missing something. I'll list a few pieces of information about using Instruments to profile on connected device.

  • You can use Instruments to target running processes on a connected device. It depends on the chosen instrument and the target process what kind of data you get. For example, you should be able to get Time Profiler data from any process on the device, but the HTTP Traffic instrument can only get data from debuggable processes. A process is usually debuggable when it was launched from a development executable installed by Xcode, but not e.g. from an app installed via the AppStore.
  • It sounds like you can't easily connect the device via a cable to your Mac once it's in the case. Do you have an option to connect it to your Mac at an earlier time? Once you connected a device via cable to your Mac once and set it up for development, it should then be discoverable wirelessly in Xcode and Instruments as well and both debugging and profiling should work via wireless connection. However, whether it works also heavily depends on the WiFi network, some networks are configured to prevent communicated between clients on the same network, in which case this may not work.
Accepted Answer

I'm not sure I correctly understand your question, so please let me know whether I'm missing something. I'll list a few pieces of information about using Instruments to profile on connected device.

  • You can use Instruments to target running processes on a connected device. It depends on the chosen instrument and the target process what kind of data you get. For example, you should be able to get Time Profiler data from any process on the device, but the HTTP Traffic instrument can only get data from debuggable processes. A process is usually debuggable when it was launched from a development executable installed by Xcode, but not e.g. from an app installed via the AppStore.
  • It sounds like you can't easily connect the device via a cable to your Mac once it's in the case. Do you have an option to connect it to your Mac at an earlier time? Once you connected a device via cable to your Mac once and set it up for development, it should then be discoverable wirelessly in Xcode and Instruments as well and both debugging and profiling should work via wireless connection. However, whether it works also heavily depends on the WiFi network, some networks are configured to prevent communicated between clients on the same network, in which case this may not work.
Is it possible to run instruments an App without being connected to Xcode?
 
 
Q