---
title: GCStylus.DidConnectMessage
framework: gamecontroller
role: symbol
role_heading: Structure
path: gamecontroller/gcstylus/didconnectmessage
---

# GCStylus.DidConnectMessage

A message that posts after a stylus accessory connects to the device.

## Declaration

```swift
struct DidConnectMessage
```

## Overview

Overview Use the .didConnect identifier with NotificationCenter to listen for this message. let observation = NotificationCenter.default.addObserver(of: GCStylus.self, for: .didCnnect) { message in    let stylus = message.stylus } Connections of stylus accessories will be reflected in the styli array of the GCStylus class when the message posts.

## Topics

### Initializers

- [init(stylus:)](gamecontroller/gcstylus/didconnectmessage/init(stylus:).md)

### Instance Properties

- [stylus](gamecontroller/gcstylus/didconnectmessage/stylus.md)

## Relationships

### Conforms To

- [NotificationCenter.MainActorMessage](foundation/notificationcenter/mainactormessage.md)
- [SendableMetatype](swift/sendablemetatype.md)
