One Logo Pool Ball
DeviceActivity · IOS API REFERENCE

DeviceActivityData.ActivitySegment

struct · iOS 16.0+ · SDK 27.1

struct ActivitySegment

Represents the user's activity during a particular date interval. This type contains all of the activity details for a particular user on a particular device during ``dateInterval``.

Members (10)

get · iOS 16.0+

totalPickupsWithoutApplicationActivity

TypeScript
get totalPickupsWithoutApplicationActivity(): number
Swift declaration
var totalPickupsWithoutApplicationActivity: Int

The number of times the user picked up the device but did not use any applications.

set · iOS 16.0+

totalPickupsWithoutApplicationActivity

TypeScript
set totalPickupsWithoutApplicationActivity(value: number)
Swift declaration
var totalPickupsWithoutApplicationActivity: Int

The number of times the user picked up the device but did not use any applications.

get · iOS 16.0+

totalActivityDuration

TypeScript
get totalActivityDuration(): number
Swift declaration
var totalActivityDuration: TimeInterval

The total activity during the activity segment. This value represents the total amount of time the device's screen was on during ``dateInterval``.

set · iOS 16.0+

totalActivityDuration

TypeScript
set totalActivityDuration(value: number)
Swift declaration
var totalActivityDuration: TimeInterval

The total activity during the activity segment. This value represents the total amount of time the device's screen was on during ``dateInterval``.

get · iOS 16.0+

longestActivity

TypeScript
get longestActivity(): (_Foundation_DateInterval) | null
Swift declaration
var longestActivity: DateInterval?

The date interval of the user's longest activity session during the activity segment. This value may be `nil` if the user was not active on this device during ``dateInterval``.

set · iOS 16.0+

longestActivity

TypeScript
set longestActivity(value: (_Foundation_DateInterval) | null)
Swift declaration
var longestActivity: DateInterval?

The date interval of the user's longest activity session during the activity segment. This value may be `nil` if the user was not active on this device during ``dateInterval``.

get · iOS 16.0+

firstPickup

TypeScript
get firstPickup(): (globalThis.Date) | null
Swift declaration
var firstPickup: Date?

The first time the user picked up the device during the activity segment. This value may be `nil` if the device was never picked up during ``dateInterval``.

set · iOS 16.0+

firstPickup

TypeScript
set firstPickup(value: (globalThis.Date) | null)
Swift declaration
var firstPickup: Date?

The first time the user picked up the device during the activity segment. This value may be `nil` if the device was never picked up during ``dateInterval``.

get · iOS 16.0+

dateInterval

TypeScript
get dateInterval(): _Foundation_DateInterval
Swift declaration
var dateInterval: DateInterval

The date interval of the activity segment. This is determined by the ``DeviceActivityFilter.SegmentInterval`` that your app requests.

set · iOS 16.0+

dateInterval

TypeScript
set dateInterval(value: _Foundation_DateInterval)
Swift declaration
var dateInterval: DateInterval

The date interval of the activity segment. This is determined by the ``DeviceActivityFilter.SegmentInterval`` that your app requests.

Skipped declarations

No declarations were skipped in this snapshot.

All DeviceActivity types →