One Logo Pool Ball
HealthKit · IOS API REFERENCE

HKStateOfMind

class · iOS 18.0+ · SDK 27.1

class HKStateOfMind

Members (6)

get · iOS 18.0+

kind

TypeScript
get kind(): HKStateOfMind_Kind
Swift declaration
var kind: HKStateOfMind.Kind { get }
get · iOS 18.0+

valence

TypeScript
get valence(): number
Swift declaration
var valence: Double { get }
get · iOS 18.0+

valenceClassification

TypeScript
get valenceClassification(): HKStateOfMind_ValenceClassification
Swift declaration
var valenceClassification: HKStateOfMind.ValenceClassification { get }
get · iOS 18.0+

associations

TypeScript
get associations(): Array<HKStateOfMind_Association>
Swift declaration
var associations: [HKStateOfMind.Association] { get }

Zero or more facets of life with which this felt experience is associated.

init · iOS 18.0+

init

TypeScript
static init(date: globalThis.Date, kind: HKStateOfMind_Kind, valence: number, labels: Array<HKStateOfMind_Label>, associations: Array<HKStateOfMind_Association>, metadata?: (Record<string, unknown>) | null): HKStateOfMind
Swift declaration
convenience init(date: Date, kind: HKStateOfMind.Kind, valence: Double, labels: [HKStateOfMind.Label], associations: [HKStateOfMind.Association], metadata: [String : Any]? = [:])

Creates a new log describing an experienced emotion at a moment in time.

get · iOS 18.0+

labels

TypeScript
get labels(): Array<HKStateOfMind_Label>
Swift declaration
var labels: [HKStateOfMind.Label] { get }

Zero or more specific sentiments selected to represent a felt experience.

Skipped declarations

1 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.

HKStateOfMind.init()

inherited init: cannot prove legal (class declares 1 custom initializer)

All HealthKit types →