Log energy data in iOS

  1. Go to Settings > Developer > Logging on your device.

    Note: To see the Developer settings, you must provision the device for development and connect it to your Mac while Xcode or Instruments is running. If your device hasn’t been provisioned yet, see Configuring Your Xcode Project for Distribution and Launching Your App on Devices in App Distribution Guide. Even after the device has been provisioned, the Developer setting disappears when the device is rebooted or powered off. To restore the setting, reconnect the device to Xcode or Instruments.

    Log energy usage directly on an iOS device

    Log energy usage directly on an iOS device

  2. Enable energy logging.

    Log energy usage directly on an iOS device

  3. Tap Start Recording.

    Log energy usage directly on an iOS device

  4. Use your device normally.

  5. When you’re done, return to Settings > Developer > Logging and tap Stop Recording.

    Log energy usage directly on an iOS device

Import logged energy data from an iOS device

  1. Launch Instruments, and create a new trace document that targets your device and app with the Energy Log profiling template.

    Log energy usage directly on an iOS device

  2. Choose File > Import Logged Data from Device.

    Log energy usage directly on an iOS device

    The logged data is imported and displayed in the timeline and detail panes.

    Log energy usage directly on an iOS device

 

https://help.apple.com/instruments/mac/current/#/dev03a7149d

相关文章: