简体   繁体   中英

How to check if app is running from xcode

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.

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]

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM