When defining an event, starting from iOS 17.4 you can set includesPastActivity to true. Which I think solves one of the problems you mentioned.
try something like this:
let event = DeviceActivityEvent(
applications: appTokens,
threshold: DateComponents(minute: 60)
includesPastActivity: true
)
Post
Replies
Boosts
Views
Activity
Did you manage to find any workarounds regarding this?