Why do I see this error: HTTP Traffic: HTTP traffic tracing is not available prior to iOS 15, macOS 12 Monterey, tvOS 15, or watchOS 8.

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

Answered by DTS Engineer in 815206022

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:

  1. 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")
    
  2. I ran it on an iOS 18.1 test device, just to make sure it works.

  3. I then chose Product > Profile.

  4. In Instruments, I selected the Network template.

  5. I hit record.

  6. And then in the app I tapped my test button a few times.

  7. 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"

Accepted Answer

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:

  1. 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")
    
  2. I ran it on an iOS 18.1 test device, just to make sure it works.

  3. I then chose Product > Profile.

  4. In Instruments, I selected the Network template.

  5. I hit record.

  6. And then in the app I tapped my test button a few times.

  7. 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"

Turns out a restart of my Mac fixed it. Thanks!

Why do I see this error: HTTP Traffic: HTTP traffic tracing is not available prior to iOS 15, macOS 12 Monterey, tvOS 15, or watchOS 8.
 
 
Q