Points of Interest for iOS targets in Xcode 11.4 not working?

525 Views Asked by At

I’m having troubles with Points of Interest logging in Xcode 11.4 (11E146) for iOS targets. I’m assuming it’s a bug, and have filed a bug report (FB7639664), but wondering if others are having problems, too. Or is there some obscure option that is preventing it from displaying properly? I don’t see anything obvious under the “Recording Options” for “Points of Interest” ...

Anyway, consider this code:

import UIKit
import os.log

private let pointsOfInterest = OSLog(subsystem: "PointsOfInterestDemo", category: .pointsOfInterest)

class ViewController: UIViewController {

    override func viewDidLoad() {
        super.viewDidLoad()
        os_signpost(.event, log: pointsOfInterest, name: #function)
    }

    @IBAction func didTapStartRange(_ sender: Any) {
        let id = OSSignpostID(log: pointsOfInterest)
        os_signpost(.begin, log: pointsOfInterest, name: #function, signpostID: id)

        DispatchQueue.main.asyncAfter(deadline: .now() + 3) {
            os_signpost(.end, log: pointsOfInterest, name: #function, signpostID: id)
        }

        os_log(#function)
    }

    @IBAction func didTapSignpost(_ sender: Any) {
        os_signpost(.event, log: pointsOfInterest, name: #function)

        os_log(#function)
    }
}

In Xcode 11.3.1, if I profile and tap on a few buttons, I get:

enter image description here

But same process in Xcode 11.4 results in:

enter image description here

Note, I’m showing the console, so you can see the taps are happening, but nothing in Points of Interest.

It works in Xcode 11.3.1 (11C505), but not Xcode 11.4 (11E146). And in Xcode 11.4, it works for macOS targets, but not iOS targets. I’m running Catalina 10.15.4 (19E266) on MacBook Pro (15-inch, 2018). I tried deferred recording and using older simulator versions, too, all with no joy.

By the way, while I report that it works for macOS targets, I did see some hinky behavior where the Points of Interest for my macOS target went blank for a fraction of a second, but came right back. While that is quite possibly unrelated, given the misbehavior in iOS, it didn’t instill confidence in the macOS implementation, either.

1

There are 1 best solutions below

0
On BEST ANSWER

FWIW, Apple has acknowledged the issue and has subsequently fixed this bug.