how to use os_activity api in swift

There's an example(Paper Company) which demonstrates how logging works.

But no word about activity tree and how it corelates.

I found some descriptions in os.activity module.

Is there any example which demonstrates how activity API is used in swift ?

Accepted Reply

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

os
module 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"

Replies

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

os
module 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"

I thank You Eskimo for answer on this topic.

I know that roadmaps and deadlines are things that Apple don't like to discuss.

But if there will be news regarding os_activity on swift, it would be nice if this topic would get updates.


Thank you!

Quinn,


We have iOS app and we want to disable to device log. We set the OS_ACTIVITY_MODE=Disable. But still, the logs show in the device. Is there a way to disable log be collect in the device?