When creating an icon using icon composer, I cant upload a build to testflight/App Store connect.
Running on device from Xcode works fine, but as soon as I archive and upload to App Store Connect, I get an error saying the icon contains an alpha channel
Instruments
RSS for tagInstruments is a performance-analysis and testing tool for iOS, iPadOS, watchOS, tvOS, and macOS apps.
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
Hello Apple team,
I am using xctrace to record an Allocations trace on iOS. For example:
xctrace record
--template "Allocations"
--launch com.example.myapp
--time-limit 30s
--output alloc.trace
After recording, I can export the results in Allocations List format (flat list of allocations) using:
xcrun xctrace export --input ./alloc.trace --xpath '/trace-toc/run/tracks/track[@name="Allocations"]/details/detail[@name="Allocations List"]' --output ./alloc.xml
This works fine and produces an XML output.
However, what I really need is to export the data in Call Tree format (as shown in Instruments GUI). I checked xctrace export --help, but it seems that the Allocations template only supports the List view for export, not the Call Tree breakdown.
My question is:
👉 Is there a way to export an Allocations trace in XML with Call Tree details using xctrace?
👉 If not, is there an API or recommended workflow to automate this instead of exporting manually from Instruments GUI?
Thanks in advance for your help!
Topic:
Developer Tools & Services
SubTopic:
Instruments
According to the ARM documentation for the CPU models available in Apple Silicon, the CoreSight implementation includes an Embedded Trace Macrocell which can perform a complete "Instruction Trace" (https://developer.arm.com/documentation/102119/0200/What-is-trace-). Although other operating systems such as Linux make this easy, we have not been able to find any tools or even a system-level API for accessing this feature of the ETM.
In the "Instruments" window of Xcode 16+, there is a "Processor Trace" instrument, but this performs sampling and is totally unrelated to the Instruction Trace we need for debugging and analysis purposes. Because it produces a complete, contiguous sequence of branch instructions, the Instruction Trace is essential for identifying precise execution behaviors that are otherwise invisible to the developer. On other platforms, an alternative is debugger scripting, but we have found far too many bugs and reliability issues with the macOS implementation of lldb.
Any suggestions would be greatly appreciated!
Topic:
Developer Tools & Services
SubTopic:
Instruments
I tried using Create ML of Xcode 26.0 beta 7 to generate a model using the "Word Tagging" template, and I received the error: Training progress unavailable - Unexpected error.
Using Create ML of XCode 16.4 with the same documentation, I was able to build the model and use it in a test app.
I'd like to understand why Create ML of Xcode 26 no longer works.
Topic:
Developer Tools & Services
SubTopic:
Instruments
I was reading through this documentation about instruments command line tool https://help.apple.com/instruments/mac/current/#/devb14ffaa5 and how it can be launched from the command line. However, unlike what the documentation states, there's no such instruments command anywhere on my macos M1 (OS version 15.6). That command gives:
$> instruments
zsh: command not found: instruments
I do have XCode installed which has the Instruments.App (GUI app) but not the command line utility:
$> ls Xcode.app/Contents/Applications/
... Instruments.app
Is that linked documentation up-to-date (it does say "latest" in the URL)? Is there some other way to install this command line utility?
I'm currently exploring Instruments for profiling and tracing on macOS 15.6.1. I know there is the "network connections" instrument which records TCP/UDP information, however it seems to not include the "lo0" (loopback) interface.
Is there a way to configure it so that localhost traffic is included in the recording? as the application I'm tracing uses that and I want that information to be included in traces.
The documentation for network-interface-detection schema makes no mention of how it detects interfaces.
Thanks in advance.
We have 2 iPhones (16 pro - iOS 18.2, 16 regular - iOS 18.5 ) in single app mode and sometimes we need to shut them down manually. After holding Power and VolumeUp, shutdown screen appears as usual, but the slider isn't responding to touch, as well as the whole screen. After force restart using volume buttons, this issue disappears, but reappears after next phone restart.
If we disable single app mode -the issue is gone and touch screen works every time on shutdown screen. Both iPhones share the same behavior.
Is there any other way to reliably shut down the iPhone locally without using MDM or a way to fix this issue?
Is there an xctrace instrument capable of capturing the complete control flow of a process? So far the best I can find is high-frequency sampling, but what I need is a trace of all machine instructions executed. This is easily done on Linux/Intel using the perf tool, which provides access to Intel's hardware-assisted tracing module (ptrace). According to the arm specification, my mac mini M1 (armv8.4-a) and M4 (armv9.2-a) both have hardware support in the CoreSight ETM (embedded trace macrocell) for full instruction tracing (i.e., no sampling, no gaps, no statistics--capturing the complete execution path). But it's not clear how I can access these features, if they are supported by the macos XNU kernel at all. After hours of searching online, it's nothing but dead ends. Any suggestions for documentation or Xcode tools or open-source tools or built-in macos tools would be much appreciated!
Topic:
Developer Tools & Services
SubTopic:
Instruments
Updated Xcode from 16.2 to 16.4, running Time Profile in Instruments, it launches the trace, but does not install or load on connected device, breaks the functionality. I am unable to debug...
ERROR:
Connection with the remote side was unexpectedly closed : <dictionary: 0x1f3c8b6d0> { count = 1, transaction: 0, voucher = 0x0, contents =
"XPCErrorDescription" => <string: 0x1f3c8b850> { length = 22, contents = "Connection interrupted" }
}
Domain: IXRemoteErrorDomain
Code: 6
User Info: {
DVTErrorCreationDateKey = "2025-08-09 00:47:53 +0000";
}
--
Connection with the remote side was unexpectedly closed : <dictionary: 0x1f3c8b6d0> { count = 1, transaction: 0, voucher = 0x0, contents =
"XPCErrorDescription" => <string: 0x1f3c8b850> { length = 22, contents = "Connection interrupted" }
}
Domain: IXRemoteErrorDomain
Code: 6
IOS 18.5
Hello,
I have recently been using the new Power Profiler tool introduced in Xcode 26 to analyze the power consumption of my app. My app primarily operates in the background. During a profiling session of 5 hours and 30 minutes, I observed that the app was active in the background for 2 hours and 30 minutes, while it remained in a suspended state for the remaining 3 hours.
While the Power Profiler allows me to identify spikes in CPU, networking, and other resource usage at specific points, it is difficult to determine whether these values are objectively considered high.
For example, in my case, the total QoS Execution Time of CPU Impact recorded during the 5 hours and 30 minutes was 12.18 seconds. I am wondering whether this is considered a good metric.
Could you please advise on the following points?
1. Is there a commonly accepted or recommended ratio between app active time and CPU time that developers should aim for?
2. Are there any guidelines or reference materials on how to interpret CPU usage and other resource metrics for apps that primarily run in the background?
Any insights or advice would be greatly appreciated.
Thank you.
Hello
We use Datadog Mobile Vitals in our app and I'm trying to run some tools in Instruments for comparison. I'm not sure what tool should I use for some of those metrics:
Slow Renders
Description: With slow renders data, you can monitor which views are taking longer than 16ms or 60Hz to render.
Instruments equivalent: Hangs including microhangs (?)
CPU ticks per second
Description: RUM tracks CPU ticks per second for each view and the CPU utilization over the course of a session. The recommended range is <40 for good and <80 for moderate.
Instruments equivalent: CPU Profiler (?)
Frozen Frames -
Description: Frames that take longer than 700ms to render appear as stuck and unresponsive in your application. These are classified as frozen frames.
Instruments equivalent: Hangs with > 500ms (?)
Memory Utilization
Description: The amount of physical memory used by your application in bytes for each view, over the course of a session. The recommended range is <200MB for good and <400MB for moderate.
Instruments equivalent: Allocation (?)
Hello,
I wanted to try new Bottleneck analysis mode showcased in recent Apple's video, however when I select CPU Counters template in Instruments, there's no such option - just the same old "sample by Time/Events".
I have the latest XCode 16.4 and OS Sonoma 15.5, the system is M4 Max. While Instruments shows version 16.0 in About dialog for some reason (a bug?), it definitely comes from the Xcode 16.4 package and the build id is the same (16F6) as for XCode 16.4. I also checked just in case on another M1 system (all updated as well) and it's all the same.
Any clues why Bottleneck analysis is missing?
Regards,
Maxim
Topic:
Developer Tools & Services
SubTopic:
Instruments
Hi,
My name is Hani Nemati, and I work at Microsoft, where we support several macOS applications such as Microsoft Edge and Teams. I’m also the primary contributor to Microsoft Performance Tools for Apple (https://github.com/microsoft/Microsoft-Performance-Tools-Apple), an open-source project aimed at improving trace analysis across platforms.
We are exploring ways to enhance our performance tracing capabilities on macOS and are particularly interested in the ability to attach PMU (Performance Monitoring Unit) counters to context switch events during trace collection. For reference, this capability is supported on Linux via LTTng using the add-context option (https://lttng.org/man/1/lttng-add-context/v2.13), and on Windows through Windows Performance Recorder (WPR), which allows PMU counters to be added at the start and end of context switches, enabling delta computation.
Would it be possible to introduce similar support in Instruments for macOS?
I’d appreciate any guidance or suggestions you might have on this request.
Thank you,
Hani Nemati
Email: hanemati@microsoft
Hiya folks! I'm David and I work on rust-analyzer, which is a language server for Rust similar to sourcekit-lsp. I'm using the new Instruments profiling tooling functionality in Xcode 16.3 and Xcode 26 (Processor Trace and CPU Counters) to profile our trait solver/type checker. While I've been able to use the new CPU Counters instrument successfully (the CPU Bottleneck feature is incredible! Props to the team!), I've been unable to make use of the Processor Trace instrument.
Instruments gives me the error message "Processor Trace cannot profile this process without proper permissions". The diagnostic suggests adding the com.apple.security-get-task-allow entitlement to the code I'm trying to profile, or ensure that the build setting CODE_SIGN_INJECT_BASE_ENTITLEMENTS = YES is enabled in Xcode.
Unfortunately, I don't know how I can add that entitlement to a self-signed binary produced by Cargo and I'm not using Xcode for somewhat obvious reasons.
Here's some information about my setup:
Instruments Version 26.0 (17A5241e)
I'm on an 14" MacBook Pro with M4 Pro. It's running macOS Version 26.0 Beta (25A5295e).
I've enabled the "Processor Trace" feature in "Developer Tools" and even added the Instruments application to "Developer Tools".
As a last-ditch effort before posting this, I disabled SIP on my Mac. Didn't help.
To reproduce my issue:
Get Rust via https://rustup.rs/.
Clone rust-analyzer: git clone https://github.com/rust-lang/rust-analyzer.git.
cd rust-analyzer
Run cargo test --package hir-ty --lib --profile=dev-rel -- tests::incremental::add_struct_invalidates_trait_solve --exact --show-output. By default, this command will output a bunch of build progress with the output containing something like Running unittests src/lib.rs (target/dev-rel/deps/hir_ty-f1dbf1b1d36575fe).
I take the absolute path of that hir_ty-$SOME-HASH string (in my case, it looks like /Users/dbarsky/Developer/rust-analyzer/target/dev-rel/deps/hir_ty-f1dbf1b1d36575fe) and add it to the "Launch" profile. To the arguments section, I add --exact tests::incremental::add_struct_invalidates_trait_solve.
I then try to record/profile via Instruments, but then I get the error message I shared above.
Below is output of codesign -dvvv:
❯ codesign -dvvv target/dev-rel/deps/hir_ty-f1dbf1b1d36575fe
Executable=/Users/dbarsky/Developer/rust-analyzer/target/dev-rel/deps/hir_ty-f1dbf1b1d36575fe
Identifier=hir_ty-f1dbf1b1d36575fe
Format=Mach-O thin (arm64)
CodeDirectory v=20400 size=140368 flags=0x20002(adhoc,linker-signed) hashes=4383+0 location=embedded
Hash type=sha256 size=32
CandidateCDHash sha256=99e96c8622c7e20518617c66a7d4144dc0daef28
CandidateCDHashFull sha256=99e96c8622c7e20518617c66a7d4144dc0daef28f22fac013c28a784571ce1df
Hash choices=sha256
CMSDigest=99e96c8622c7e20518617c66a7d4144dc0daef28f22fac013c28a784571ce1df
CMSDigestType=2
CDHash=99e96c8622c7e20518617c66a7d4144dc0daef28
Signature=adhoc
Info.plist=not bound
TeamIdentifier=not set
Sealed Resources=none
Internal requirements=none
Any tips would be welcome! Additionally—and perhaps somewhat naively—I think I'd expect the Processor Trace instrument to just work with an adhoc-signed binary, as lldb and friends largely do—I'm not sure that such a high barrier for CPU perf counters is warranted, especially on an adhoc-signed binary.
Dear Apple Developer Support team,
I would like to request an official confirmation regarding the handling of transaction status in the App Store Server API, specifically for the GET /inApps/v1/transactions/{transactionId} endpoint.
As per our current understanding from the official documentation (Get Transaction Info), the API’s behavior appears to be:
If a transaction is finalized and successfully processed by App Store, querying this API will return HTTP 200 OK along with transaction details.
If a transaction is still in a pending or deferred state (such as awaiting Ask to Buy approval or pending authorization), the API will not return a 200, and instead respond with HTTP 404 Not Found or an appropriate error.
Could you please confirm if this behavior is accurate and officially supported?
Specifically:
Does a 200 OK response guarantee that a transaction is finalized and successfully recorded on App Store servers?
In cases where a transaction is pending approval (e.g. Ask to Buy), is it correct that GET /transactions/{transactionId} would return 404 Not Found until the transaction is finalized?
We would greatly appreciate your confirmation to align our server-side logic for transaction validation accordingly.
Thank you very much for your support!
Kind regards,
cuongnx
Topic:
Developer Tools & Services
SubTopic:
Instruments
Tags:
Wallet
StoreKit Test
StoreKit
Apple Pay
It seems as though using any initializer of SubscriptionOfferView or StoreView will create a memory leak.
This can be simply reproduced by adding this to your SwiftUI view:
SubscriptionOfferView(groupID: "yourgroupID", visibleRelationship: .all, useAppIcon: true)
or
StoreView(ids: ["monthly", "yearly"])
Tested on iOS 26 beta 2
Hi :wave:
I am not sure that I use it right, I was not able to profile using these events:
I am on a M1 Pro machine using macOS 15.5.
I just wonder if these events are support on Apple Sillicon.
Topic:
Developer Tools & Services
SubTopic:
Instruments
I’m seeing inconsistent call stacks and usage percentages in the Time Profiler between two Instruments builds:
• Xcode 16.0’s Instruments Version 16.0 (16A242d)
• Xcode 16.3’s Instruments Version 16.0 (16E140)
When I open an old .trace file recorded with the 16A242d profiler in the newer 16E140 Instruments, the call trees and percentage breakdowns no longer match. It looks like the latest Instruments now exposes or collapses different frames (e.g. system libraries, inline code) by default.
I rely on these call stacks as a baseline to track performance regressions and verify optimizations over time. Unfortunately, every Xcode/Instruments update changes what I see, making it impossible to compare profiles across versions.
My questions:
Is there a way in Instruments 16.0 (16E140) to restore the exact call-tree view and percentage calculations that 16A242d produced?
Failing that, is there a recommended workflow or tool for capturing CPU profiles in a way that remains stable and comparable, regardless of Xcode or Instruments version?
Any guidance on achieving consistent, version-independent performance measurements would be greatly appreciated!
Instruments: GPU Service reported error: Selected counter profile is not supported on target device`
I could use the Metal System Trace before the most recent update, but now whenever I try to profile using the Metal Counter instrument, I get the
[Warning] GPU Service reported error: Selected counter profile is not supported on target device. What is the issue here?
I kept CoreLocation’s startUpdatingLocation running for a full day and used Performance trace - PowerProfiler to track the power usage during that time. The trace file was successfully generated on the iOS device, and I later transferred it to my MacBook.
However, when I tried to open the .atrc file, I received the following warning:
The document cannot be imported because of an error: File ‘/Users/jun/Downloads/PowerProfiler_25-06-16_181049_to_25-06-17_091037_001.atrc’ doesn’t contain any events.
Why is this happening? Is there a known issue with PowerProfiler in iOS 26, or am I missing something in the tracing setup?
Note: The .aar file and the extracted .atrc file are not attached here, as forum uploads do not support these formats.