Instruments

RSS for tag

Instruments is a performance-analysis and testing tool for iOS, iPadOS, watchOS, tvOS, and macOS apps.

Instruments Documentation

Post

Replies

Boosts

Views

Activity

Help me to understand sending push to Wallet card
Good afternoon) I am doing one of the test projects to create a PKPASS and a server to update this file on the device, as well as sending PUSH-a. APN service is used with JWT Bearer token. The server is written in Java Springboot. We try to send push notification, pkpass update happens, response from APN 200 OK. But there is no notification, can you please tell me why this is happening? I am also sending you a sample request: curl -v -X POST -H "apns-push-type: alert" -H "apns-id: 5af474c5-a212-42f3-9f99-70a9e587e1e2" -H "apns-topic: pas.example225" -H "apns-expiration: 0" -H "authorization: bearer eyJraWQiOiJGQ0pQVFFMV1ZNIiwiYWxnIjoiRVMyNTYifQ.eyJpc3MiOiI2N0ZGUTY1TEQzIiwiaWF0IjoxNzMwMzY3NzQ4fQ.FGXSLCR6mxkQyi7bNliZKZbVdN3m0xQzFSMUDRFU4aAYIgsgflk5MDEkS9k5riMHp10wpr80b20uq9cuPnoQqw" --data '{"aps":{"alert":{"title":"title","subtitle":"subtitle","body":"body"}}}' \ P.S. I checked JWT on the page: https://icloud.developer.apple.com JWT was built correctly. Thank you for your reply) Translated with DeepL.com (free version)
1
0
130
2w
Discrepancy between Xcode Memory Report and Xcode Instruments Memory Profiler
Hi Apple Engineers, I am encountering an issue where the memory usage reported by the Xcode memory report and the Xcode Instruments memory profiler are not aligned. Specifically: Xcode Memory Report: After implementing autoreleasepool, URLSession reading a zip file, and moving the task inside DispatchQueue.global().async, the memory usage goes down from 900MB to 450MB, indicating a potential memory leak. Xcode Instruments Memory Profiler: The memory usage goes down from 900MB to 100MB, suggesting that the memory has been properly released and there is no significant memory leak. Could you please help me understand the discrepancy between these two tools and provide guidance on the appropriate way to interpret the memory usage in my application? Which result I should rely on it? I would greatly appreciate your insights and expertise on this matter. Thank you in advance for your assistance.
2
0
119
1w
Memory leak issue. Is this a bug or am I doing something wrong?
I've been developing an app for macOS for some time. As I've been approaching the app's final development stages, I decided to try Instruments as I've suspected a memory leak was occurring, since my app's memory usage slowly grows over time. Instruments has found one leak, and I've spent considerable time trying to find the cause. Long story short, I've ended up with just an EmptyView() and Instruments were still showing a leak. I've tried creating a new project with a placeholder "Hello, world!" text, and Instruments were still detecting a leak. Am I doing something wrong here? Maybe I'm not using Instruments correctly? Or is this a bug? My Instruments version is 16.0, macOS Sequoia 15.1.
1
0
69
5d
Cannot run Animation Hitches Instrument
I'm trying to run the Instrument "Animation Hitches", but it fails immediately after starting on the iPhone. This happens on multiple projects, including a brand new project. I get the following errors: Timestamp | Message (Before Run Started) | Unexpected failure: Couriers have returned unexpectedly. (Before Run Started) | Failed to start the recording: Failed starting ktrace session. The issue also happens with the instruments App Launch, but not with any other that I tested. Is this a bug? Using Xcode Version 16.1, Mac Mini M1 Sequoia 15.1. Running project on iPhone 14 Pro iOS 18.1.
2
1
88
1d
Not seeing signposts when profiling a unit test (Xcode 16.1)
While I was recently profiling some code from a Swift library, I noticed that XCTest added in signposts for the measurement tests, which I found really helpful to "home in" on the code I wanted to profile digging around in the stack trace. I tried to add my own signposts to provide just a bit of my own markers in there, but while it compiles and profiles equivalently, the signposts just aren't showing up. This is with Xcode 16.1, macOS Sequoia (15.1) and a swift library, using XCTest and profiling within one of the unit tests. Is there something in this sequence that doesn't allow the library to set up signposts and have instruments collect them? The flow I'm using: import os let subsystem = "MyLibrary" class MyClass { let logger: Logger = .init(subsystem: subsystem, category: "fastloop") let signposter: OSSignposter init() { signposter = OSSignposter(logger: logger) } func goFast() { let signpostId = signposter.makeSignpostID() let state = signposter.beginInterval("tick", id: signpostId) // ... do a bunch of work here - all synchronous signposter.endInterval("tick", state) } } Is there something I'm doing incorrectly in using this API, or not enabling to allow those signposts to be collected by the profiler? I do see the signposts that XCTests injects into the system, just not any of the ones I'm creating.
1
0
100
1d