AFAICT it’s not currently feasible to use the OS activity API from Swift (r. 17129226). This, along with the new OS logging API, presents some unique challenges to the Swift environment (macros, special string section, string coalescing, and so on). There’s been some progress on this front for OS logging — specifically, if you import the
osmodule you can then call
oslog(_:…)(r. 17294150) — but this doesn’t yet extend to OS activity.
Share and Enjoy
Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware
let myEmail = "eskimo" + "1" + "@apple.com"