I am running Xcode 16.1, macOS 15.1 , iOS 18.1, and I see the error when trying to run the Instruments Network Profile
Hmmm, that’s weird. I suspect that Instruments is having some of problem working with the device and that’s getting incorrectly surfaced as this error.
FWIW, I tried this here in my office and it worked for me:
-
Using Xcode 16.1, I created a new test project and wired up this code to a button:
print("will start task") let url = URL(string: "https://example.com")! let request = URLRequest(url: url, cachePolicy: .reloadIgnoringLocalCacheData, timeoutInterval: 60.0) URLSession.shared.dataTask(with: request) { (data, response, error) in if let error = error as NSError? { print("task did fail, error: \(error.domain) / \(error.code)") return } let response = response as! HTTPURLResponse let data = data! print("task finished, status: \(response.statusCode), bytes: \(data.count)") }.resume() print("did start task")
-
I ran it on an iOS 18.1 test device, just to make sure it works.
-
I then chose Product > Profile.
-
In Instruments, I selected the Network template.
-
I hit record.
-
And then in the app I tapped my test button a few times.
-
Back in Instruments, I saw the network requests.
I’m running on macOS 14.7.1, not 15.1, but that shouldn’t make a difference.
If you run through the steps above, do you still see the error?
If you restart your Mac and your iOS device, does that help?
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"