---
title: "留存消息"
description: "在 Apple 的取消订阅界面中向订阅者展示自定义消息。您在 Adapty 中创建消息，Adapty 会自动将其发送给 Apple。"
---

<CustomDocCardList ids={['retention-messaging-setup', 'retention-messaging-create']} />

留存消息功能可在 iOS 取消订阅界面上、用户确认取消之前，向订阅者展示自定义消息。借助它，您可以说服即将流失的订阅者继续留下来。

*默认*消息为每位订阅者提供留下来的理由。*促销*消息则增加具体激励：折扣、免费试用，或切换到更合适方案的机会。Apple 会向每位订阅者展示与其产品和语言相匹配的消息。

你可以在 Adapty 看板中创建、本地化和测试消息。Adapty 会自动将其发送给 Apple，无需发布新版本应用。

## 快速入门 \{#quickstart\}

开始之前，你需要：

- 加入 [Apple 的 Retention Messaging 计划](https://developer.apple.com/documentation/retentionmessaging)。
- 在 Adapty 中配置一个 [App Store Connect API 密钥](app-store-connection-configuration)。

然后：

1. [在沙盒模式下将 Adapty 连接到 Retention Messaging API](retention-messaging-setup)。
2. 在沙盒模式下购买一个产品，以便连接测试有可用的交易记录。
3. 通过 Apple 的连接测试。
4. 切换到生产模式。
5. [创建生产环境消息](retention-messaging-create)——先创建默认消息，再创建促销活动消息——并逐一提交给 Apple 审核。