0

I'm using a test library to see me crash report, and I need to know if the app is running from Xcode, I know that exist the DEGUB parameter, but it does not work because if install app from xcode and open it, DEGUB parameter will be in YES.

Thanks.

  • possible duplicate of [Programmatically detect if app is being run on device or simulator](http://stackoverflow.com/questions/5775420/programmatically-detect-if-app-is-being-run-on-device-or-simulator) – Sarah Elan Apr 20 '15 at 17:20
  • That's not his question. – Pablo A. Apr 20 '15 at 17:22
  • Thanks for the answer but that's not the question, I need to know if the device is running, while is connected to xcode. – Ricardo Burgos Apr 20 '15 at 17:28

1 Answers1

0

Not exactly what you want, but you can check if the cable is plugged in, so if it's just for testing the solution should be enough.

[[UIDevice currentDevice] batteryLevel] 

or

[[UIDevice currentDevice] UIDeviceBatteryState]
Pablo A.
  • 2,042
  • 1
  • 17
  • 27