<!--
{
  "availability" : [
    "iOS: 11.0.0 -",
    "iPadOS: 11.0.0 -",
    "macCatalyst: 11.0.0 -",
    "tvOS: 11.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 4.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "HomeKit",
  "identifier" : "/documentation/HomeKit/HMPresenceEvent/init(presenceEventType:presenceUserType:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "HomeKit"
    ],
    "preciseIdentifier" : "c:objc(cs)HMPresenceEvent(im)initWithPresenceEventType:presenceUserType:"
  },
  "title" : "init(presenceEventType:presenceUserType:)"
}
-->

# init(presenceEventType:presenceUserType:)

Creates a new presence event with the specified event and user presence types.

```
init(presenceEventType: HMPresenceEventType, presenceUserType: HMPresenceEventUserType)
```

## Parameters

`presenceEventType`

The event type that determines when the event fires.

`presenceUserType`

The user type whose presence triggers the event.

## Return Value

An initialized presence event.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)