How to measure energy usage in Xcode 13 / iOS15?

I'd like to confirm the battery usage of an app I am developing on iOS, specifically on Xcode 13 and iOS 15. (Note: This app previously showed no issues with battery usage on previous versions of iOS.)

Previously, it seems that there were two ways to gather energy usage information:

#1. On the device under Settings > Developer > Logging

  • As per Apple's documentation described in the section titled "Log Energy Usage Directly on an iOS Device".
  • However, on iOS15, I can't find any options for logging under Developer or anywhere under settings even when searching.

#2. Profiling via Instruments using the "Energy Log" template

  • As per the same documentation from Apple described in the section "Use the Energy Diagnostics Profiling Template".
  • While it is still available in Xcode 12, this template is missing in Xcode 13. Naturally, it's also not possible to profile an iOS15 device with Xcode 12.

Digging through the Xcode 13 release notes, I found the following:

Instruments no longer includes the Energy template; use metrics reporting in the Xcode Organizer instead. (74161279)

When I access the Organizer in Xcode (12 or 13), select an app and click "Energy" for all versions of the app, it shows the following:

Apple's documentation for "Analyzing the Performance of Your Shipping App" says:

"In some cases the pane shows “Insufficient usage data available,” because there may not be enough anonymized data reported by participating user devices. When this happens, try checking back in a few days."

Well over a year into production and having sufficient install numbers, I have a feeling that waiting a few days might not do much.

I would like to determine if this is a bug in my app or a bug in iOS15. How can energy usage data be gathered using Xcode 13 on iOS 15?

We also have the problem that we are not longer able to determine the energy impact of our in house distributed apps. According to my knowledge, the Xcode organizer is only for apps which are distributed over Testflight oder the App Store. Am I right about that?

Since, as already mentioned, logging can no longer be enabled on the device, we have no chance to get energy logs from the devices. Even during an active Xcode debug session it is apparently not longer possible to open detailed instruments energy insights. In Xcode 12 with Instruments I get the following error: "The target device does not support energy logging".

Is there any possibility to get energy insights again? Thanks in advance!

We are also having this issue - we are unable to view energy logs in XCode Instruments (or in the Organizer) since downloading XCode 13. This leaves us completely in the dark for optimizing battery consumption for our app.

Were you able to find other ways of profiling energy usage in a development version of the app? I am facing the same issue as you. I would like to test my energy usage before it's released.

So no answer as to the missing energy logs or the removal of this in instruments..... hmmmm

We are trying to track down which feature is causing battery drain, without real time feedback on a dev build plugged into xcode, it's a lot harder. Dear apple, please restore this functionality.

+1 to this. We're developing a game, and it is very difficult without Instruments on energy drain. The xcode energy impact gauge does not seem calibrated for games - even under reasonable workloads (we know because we measured energy drain over 30 minutes, a very cumbersome way to test), it is pinned to the max position. Not to mention it's a purely visual tool.

How to measure energy usage in Xcode 13 / iOS15?
 
 
Q