---
title: CustomMessageIdentifiable
framework: groupactivities
role: symbol
role_heading: Protocol
path: groupactivities/custommessageidentifiable
---

# CustomMessageIdentifiable

A type that assigns a custom ID string to messages you send to other devices.

## Declaration

```swift
protocol CustomMessageIdentifiable
```

## Overview

Overview Adopt this protocol in the custom types you use to send and receive messages during a group activity. You use a GroupSessionMessenger object to send custom messages between the same app on different devices. In addition to the message data, GroupSessionMessenger encodes your custom type name so that it can construct the correct type on those other devices. Use this protocol to identify your custom message types using an app-specific string instead of the type name. Providing an app-specific string makes it possible to use different types to support messages. When the message data contains a custom message ID, GroupSessionMessenger looks for a type that conforms to the protocol with a messageIdentifier property that contains the matching string. It then creates that type and decodes the message data into it. note: Custom types that adopt this protocol must also adopt the Codable protocol.

## Topics

### Type Properties

- [messageIdentifier](groupactivities/custommessageidentifiable/messageidentifier.md)

## See Also

### Session management

- [Joining and managing a shared activity](groupactivities/joining-and-managing-a-shared-activity.md)
- [Drawing content in a group session](groupactivities/drawing_content_in_a_group_session.md)
- [GroupSession](groupactivities/groupsession.md)
- [Participant](groupactivities/participant.md)
