Context
I'm trying to profile a binary (a simple C++ program compiled into dummy.o) and collect CPU Counters data. I have a configuration that works fine from the Instruments Counters GUI (see Screenshots below).
I've exported this configuration to a template file named prof1.tracetemplate.
Problem
When I try to run a recording with that same template from the command line with xctrace (I also tried with sudo):
$ xctrace record --template prof1.tracetemplate --launch dummy.o
I get the following errors:
Starting recording with the prof1 template. Launching process: dummy.o.
Ctrl-C to stop the recording
Run issues were detected (trace is still ready to be viewed):
[Error] Unexpected failure: Couriers have returned unexpectedly.
[Error] Failed to start the recording: Failed to force all hardware CPU counters: 13.
[Error] Failed to pause recording session: Cannot pause session session unless it's running. Current state: kSessionError
[Error] Unexpected failure: Data source agent failed to arm.
Recording failed with errors. Saving output file...
Output file saved as: Launch_dummy.o_2024-01-31_14.22.32_0B6E1A78.trace
System
Chip: Apple M1
macOS: 14.1.1 (23B81)
xctrace version: 15.2 (15C500b)
xcode version: 15.2 (15C500b)
Screenshots
Dive into the vast array of tools, services, and support available to developers.
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Created
I am trying to build my watch app on my series 4 Apple watch currently running WatchOS 10.3 with a deployment target of 10.2 and Xcodes claims that my watch's OS version is too low. I have fully updated my watch to 10.3, tried to downgrade the deployment target to no avail. Xcode doesn't seem to be getting any data on what OS version my watch is running. It says watchOS () in the manage run destinations page. I imagine this is a problem with the connection between my watch and my mac but I cannot solve it. Any advice?
Is it even possible or part of VisionOS?
Thanks,
Colin
Currently, the id of my actual visionpro device is different from the xcode that works on my macmini. I added a visionpro id to xcode, but I can't build it with my visionpro. Can I log out of the existing login to xcode and log in with the same ID as visionpro? However, the appleID created for visionpro does not have an Apple Developer membership, so there is no certificate that makes it run on the actual device. How can I add my visionpro ID from the ID with my apple developer membership to run the xcode project app on visionpro? This is the first time this is the first time.
xcode 15.2, mac m2 mini, 14.2.1 sonoma
i need a pdf file to stage my app for screen shots for the market. icloud wont sync, cant drag files to the home screen or any screen, it just does not work.
i am at the end of my rope here, i just need some screen shots, my app is approved and ready
am i wrong>? is there a way to do this or is it just broken now in the name of (lazy) security?
edit--the more i read the more i angry and frustrated i get. this is broken and will not be fixed. i need to just workaround via email. so happy my second 100 dollar developer subscription bill is coming up!
I would like to create iOS App that have MTP-USB functions.
So I have the following questions:
1.Is it possible to create an application with MTP-USB function using .NET MAUI?
2.If 1. is possible, how should I implement it?
The devices I plan to use are iPhone 15 and iPhone 15 Pro.
Thanks.
Trying to post a question about packages on this forum, I keep cueing the message:
'This post contains sensitive language. Please revise it in order to continue.'
There is nothing in my query that is remotely ‘sensitive’.
I don’t know what to do next.
Thanks in advance for any advice.
Regards,
Lar
I currently own an Apple Watch SE2 device.
However, when I try to debug from the watch to the actual device, the connection loss issue occurs all too often.
Once the connection is lost, it continues to try to connect in the Disconnected list on the Xcode "Devices and Simulators" screen and is in a loading state.
Very often, even when the connection is established and you are trying to start debugging, it drops out.
Xcode cannot debug properly on the actual device.
I later found out that the Apple Watch SE2 does not support 5.0 Hz Wi-Fi, only 2.5 Hz.
I think that might be the cause.
Is this phenomenon less likely to occur if you debug on an actual device such as a regular Apple Watch 7/8/9 or Ultra model?
In fact, if debugging is difficult with the Apple Watch SE model, I am wondering whether I should purchase an additional Apple Watch.
Or is there another way to improve this issue?
It would be nice if the Apple Watch could be debugged by connecting it to a Mac with an actual cable like the iPhone.
I am wondering if there is a way to disable and enable network debugging in Xcode.
In the past, debugging the watch using only Bluetooth with the iPhone in Xcode seemed to be more stable.
Except for the Watch, the iPad doesn't have any major issues with Wi-Fi debugging on the iPhone.
Hello,
I'm trying to use devicectl to observe Darwin Notifications on my iPhone.
Instructions:
OVERVIEW: Observe a Darwin notification on a device.
Note that this command will wait for 300 seconds by default before exiting. You
can override this by providing a different --timeout value.
USAGE: devicectl device notification observe --device <uuid|ecid|udid|name> --name <name> ... [--verbose] [--quiet] [--timeout <seconds>] [--json-output <path>] [--log-output <path>]
DEVICE OPTIONS:
-d, --device <uuid|ecid|udid|name>
The identifier, ECID, UDID, or name of the device.
COMMAND OPTIONS:
--name <name> The name of the Darwin notification.
This can be passed multiple times to observe multiple Darwin
notifications.
OUTPUT OPTIONS:
-v, --verbose If given, provide more logging output than normal.
-q, --quiet If given, output will include only errors.
-t, --timeout <seconds> The overall command timeout in seconds. If this limit
is exceeded the command is abandoned as a failure.
-j, --json-output <path>
An optional path to write a JSON file with command
results.
Note: JSON output to a user-provided file on disk is the ONLY supported
interface for scripts/programs to consume command output.
-l, --log-output <path> An optional path to write all logging otherwise
passed to stdout/stderr.
OPTIONS:
--version Show the version.
-h, --help Show help information.
Executed command: xcrun devicectl device notification observe --device XXX --name com.example.Notification
Result: Darwin notification observation started. 300.0 seconds remaining:
On iOS, I'm posting a Darwin notification using:
CFNotificationCenterPostNotification(center, CFNotificationName("com.example.Notification" as CFString), nil, nil, true)
My CFNotificationCenterAddObserver on iOS does receive this notification. But the devicectl does not. Also no results when I remove the observer on iOS.
How can I send a notification in such a way that it is picked up by the devicectl observer?
I want to use a ci_script to change the CI_BUILD_NUMBER to a new value.
But in XCODE CLOUD there seems to be no programmatic way to change it?
My application targets iOS 15+. Attempting to build and run it on my iPhone SE (orphaned at iOS 15.6) results in "Failed to prepare the device for development."
I'm building with Xcode 15.2.
What is the expected procedure here?
It looks like the other thread got locked. I would still like to be able to uncheck the box for "Connect via network" so I can develop with my iOS 17+ devices normally with Xcode 15. Or a method to use Xcode 14 with iOS 17+ without CoreDevice or whatever the problematic API is.
Since Xcode 15.3 it has become impossible to build our project more twice in a row without encountering a batch of "internal inconsistency error: never received target ended message for target ID …".
This issues appeared a few months ago (15.0 i think, but i'm not sure), but xcode 15.3 makes it almost unusable. We're a team of 3 iOS devs, and we're all having the problem.
Our project involves a lot of SPM packages, a few cocoa pods, a few iOS Frameworks, and a bit of swiftgen. Nothing particularly special for a large project, and no custom build steps that does anything fancy.
It is now to the point where we're looking for alternative to xcode, because we can't decently kill xcode and restart every time we have to build our code...
I have latest version Xcode-15.1 & Mac-os version Sonoma-14.3.1 - while running particularly UITest target Xcode not launching the simulator, even after build succeed & test's completed without any errors.
I tried cleaning project, re-starting Xcode, restarting system(Mac) - no luck
It would be helpful if I get any suggestion on resolving the issue.
We had Xcode Cloud working with our project. We needed to re-auth the repo which failed and ended up needing to remove the config to reset it up as new.
When on AppStoreConenct it shows its now not configured and to setup, which is good but when launch Xcode, press setup Xcode cloud it just gets stuck on loading source code repositories.
We use a local swift package in 6 of our app extensions. The product from the local package that we link to each app extension is a dynamic framework. And while the dynamic framework is copied into the final app bundle once, the resource bundles of each target that comprise the dynamic framework is copied into each app extension. I'd much rather have the bundles be copied into the dynamic framework once to prevent app bloat.
Here is a visualization of the issue:
.
└── MyApp.ipa/
├── MyApp (executable)
├── MyDynamicFramework_TargetA.bundle
├── MyDynamicFramework_TargetB.bundle
├── MyDynamicFramework_TargetC.bundle
├── Frameworks/
│ └── MyDynamicFramework.framework/
│ ├── TargetA
│ ├── TargetB
│ └── TargetC
└── PlugIns/
├── Widgets.appex/
│ ├── MyDynamicFramework_TargetA.bundle
│ ├── MyDynamicFramework_TargetB.bundle
│ └── MyDynamicFramework_TargetC.bundle
├── Intents.appex/
│ ├── MyDynamicFramework_TargetA.bundle
│ ├── MyDynamicFramework_TargetB.bundle
│ └── MyDynamicFramework_TargetC.bundle
├── IntentsUI.appex/
│ ├── MyDynamicFramework_TargetA.bundle
│ ├── MyDynamicFramework_TargetB.bundle
│ └── MyDynamicFramework_TargetC.bundle
├── NotificationContent.appex/
│ ├── MyDynamicFramework_TargetA.bundle
│ ├── MyDynamicFramework_TargetB.bundle
│ └── MyDynamicFramework_TargetC.bundle
├── RichPushContent.appex/
│ ├── MyDynamicFramework_TargetA.bundle
│ ├── MyDynamicFramework_TargetB.bundle
│ └── MyDynamicFramework_TargetC.bundle
└── NotificationService.appex/
├── MyDynamicFramework_TargetA.bundle
├── MyDynamicFramework_TargetB.bundle
└── MyDynamicFramework_TargetC.bundle
Notice that the resource bundles of Target A, B, and C are copied multiple times causing an unhealthy app size.
I'd either like the resource bundles to be copied into MyDynamicFramework or copied once into the app bundle and let the app extensions reference them.
Given the SPM + Xcode linking is a black box for the most part, how would I accomplish this?
We have been using a Supervision Identity successfully over the last few years to allow us to Xcode debug on managed devices. Something has changed in the last few months which we are finding it hard to find a consistent solution to. We can't determine whether it's Xcode 15/iOS version related. Behaviour we see documented below
All Macs with the Supervision Identity installed can open the device in Apple Configurator without need for trust acknowledge on the device. Configurator can open and stream the device console.
All problematic devices are also registered as a development device with Apple.
We have hit and miss connectivity in Finder, On failure it indicates that the trust prompt on the device needs to be accepted. No trust prompt is displayed
Developer Mode on the device can't be enabled until we attempt to connect to Xcode
Devices that pair successfully in Xcode do so almost immediately. If a device pairs in Xcode it is also visible in the native macOS Console application
If a device fails to pair in Xcode we get a spinner and the message
"Xcode has already started pairing with 'iPhone-X'. Select Trust on iPhone-X to complete pairing".
The macOS console app reports
"The user has not responded to the pairing request on 'iPhone-X' In neither case is a trust prompt displayed on a device.
We are not able to Xcode pair any managed device running iOS 17.x. This includes devices that were successfully paired on iOS16.x then upgraded
iOS16.x devices that pair with one Mac successfully will not pair with another Mac with the same Supervision Identity installed.
The same behaviour is seen on Ventura and Sonoma Macs
Clearing Trusted Computers in IOS Developer Mode has no effect
None supervised iOS devices pair successfully on iOS 16 and 17
Has anyone else witnessed similar issues and found a work around ?
Lately, I keep getting this warning when closing Xcode asking if I want to save the changes. Strangely enough, I have never received this before. I looked to see if I could disable and enable autosave. Unfortunately I have not found anything. Does anyone have any tips?
https://developer.apple.com/documentation/xcodekit/creating_a_source_editor_extension
I created new MacOS project and added a Xcode Source Editor Extension target to the project.
I run the extension in debug mode with extension target, but the extension is not show up in Editor menu debug mode Xcode.
Xcode version is 15.3(released)
MacOS version is 14.4.1 Sonoma
■Confirmation
My post on the Apple Developer Forums is not published even though it have been reviewed.
Does any work need to be done at the time of submission or after review in order to be published?
■Background of the question
I posted one on the Apple Developer Forums yesterday.
Immediately after posting, a message saying "It will be published if it passes the review" was displayed on the screen.
This morning, that message disappeared, so I thought the post had been published, but my post was not displayed on the post list screen.
I tried searching for the post title, but it doesn't appear for a while.