> For the complete documentation index, see [llms.txt](https://developers-apps-in-toss.toss.im/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developers-apps-in-toss.toss.im/guide/zh/operation/deploy.md).

# 发布迷你应用

如果已在 Toss App 中完成最终测试，就可以在 Apps in Toss 控制台请求审核并发布迷你应用。

### 1. 预先检查

#### 1-1) 游戏、非游戏发布指南

发布前请务必确认审核指南和检查清单。 [游戏](https://developers-apps-in-toss.toss.im/checklist/app-game)·[非游戏](https://developers-apps-in-toss.toss.im/checklist/app-nongame) 请确认所有发布指南，检查开发是否已完成。如果不遵守指南，可能会在审核阶段被驳回。

#### 1-2) 上传应用包时的注意事项

应用包按解压后的大小只能上传 100MB 以下。若把图片·声音·视频等资源全部包含进去，可能会超出容量，请将资源文件与构建分开管理。

建议这样管理资源。

* 请只将应用运行所必需的最少资源包含在包中。
* 请将大容量资源配置为从外部存储或 CDN 下载。
* 如果对附加资源应用分阶段下载方式（Lazy Loading），用户体验会更好。

<figure><img src="https://1415110023-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8pQgXiR5QAzduV54W8Om%2Fuploads%2FvaJm4N1VhruvHhi7QH9z%2F%E1%84%87%E1%85%A5%E1%86%AB%E1%84%83%E1%85%B3%E1%86%AF%20%E1%84%8C%E1%85%B5%E1%86%A8%E1%84%8C%E1%85%A5%E1%86%B8%20%E1%84%8B%E1%85%A5%E1%86%B8%E1%84%85%E1%85%A9%E1%84%83%E1%85%B3%20%E1%84%92%E1%85%A1%E1%86%AF%20%E1%84%84%E1%85%A2%2097.png?alt=media&amp;token=3eca711d-0bcf-4c52-9d4c-d2856ef962cb" alt=""><figcaption></figcaption></figure>

***

### 2. 提交审核请求

完成测试后，在控制台点击“提交审核请求”按钮即可开始审核。审核最多需要 3 个工作日，且根据应用类别不同，可能需要 7 天以上。

* 至少完成 1 次测试后，审核请求按钮才会启用。
* 每次审核请求只能提交一个版本。

提交审核后如果发现需要修复的 bug，请点击“取消请求”按钮取消审核。然后上传修复后的新包（`.ait`）并重新提交审核请求即可。

<figure><img src="https://1415110023-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8pQgXiR5QAzduV54W8Om%2Fuploads%2FcsUExLlWzp8RoFEXz43x%2F%E1%84%87%E1%85%B5%E1%84%80%E1%85%A6%E1%84%8B%E1%85%B5%E1%86%B7%2083.png?alt=media&amp;token=1440e524-a2bc-45cc-8e55-7fee2c472479" alt=""><figcaption></figcaption></figure>

#### 审核被驳回时

请点击“查看驳回原因”按钮确认原因后，上传已解决问题的新包，并重新提交审核请求。如果对驳回原因还有更多疑问， [Channel Talk](https://apps-in-toss.channel.io/workflows/787658)可通过此方式咨询。

***

### 3. 发布

包获得批准后，我们会通过电子邮件通知审核结果。之后在控制台点击“发布”按钮，迷你应用就会向用户公开。

发布后会立即对所有用户生效。请务必充分测试后再发布。

<figure><img src="https://1415110023-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8pQgXiR5QAzduV54W8Om%2Fuploads%2F4hikUgHNPAGvvwKERub9%2F%E1%84%87%E1%85%B5%E1%84%80%E1%85%A6%E1%84%8B%E1%85%B5%E1%86%B7%2032.png?alt=media&amp;token=b753d8a1-2dd6-4393-ae53-bd3ae270ff0f" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
**测试环境与实际环境的差异**

测试环境与实际线上环境的 CORS 策略和网络行为可能不同。尤其请务必在实际环境中再次确认以下功能。

* 内存·资源使用量
* 网络请求（CORS）：需要在 Origin 白名单中注册以下域名。\
  这会因 SDK 版本而异。<br>

  SDK 3.x

  * 正式服务环境： `https://<appName>.web.tossmini.com`
  * QR 测试环境： `https://<appName>.private-web.tossmini.com`

  \
  SDK 1.x \~ 2.x

  * 正式服务环境： `https://<appName>.apps.tossmini.com`
  * QR 测试环境： `https://<appName>.private-apps.tossmini.com`
* 权限处理
* 登录·会话保持
* 实际支付·认证功能

即使在测试环境中正常，在实际环境中也可能出现错误。
{% endhint %}

***

### 4. 发布后管理

发布后可以在 Apps in Toss 控制台进行版本管理和更新。根据需要，可以上传新包，或维持·管理现有版本。

#### 4-1. 发布新版本（更新）

* 如果添加了新功能或修复了错误，请按与之前相同的方式上传新的应用包（`.ait`）请上传。
* 上传的包会再次经历 提交审核 → 批准 → 发布 的流程。
* 批准后点击“发布”按钮，新版本就会替换现有应用。

已发布的版本会立即对用户生效，请务必提前充分测试后再上传。

#### 4-2. 回滚

* 可在“应用发布”菜单中查看此前已发布的版本列表。
* 出现问题时，可以回滚到之前的版本。
* 选择要回滚的版本后，点击“发布”按钮。

回滚也会立即对用户生效，请谨慎选择版本。

<figure><img src="https://1415110023-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8pQgXiR5QAzduV54W8Om%2Fuploads%2Fr4B2aVhF5yBdGqRDIWCZ%2F%E1%84%80%E1%85%A6%E1%84%8B%E1%85%B5%E1%86%B7%2063.png?alt=media&amp;token=8b3289c5-2d37-4950-a472-fe118125339b" alt=""><figcaption></figcaption></figure>

#### 4-3. 紧急修复（Hotfix）

如果应用运行时出现严重错误， [Channel Talk](https://apps-in-toss.channel.io/workflows/787658)请立即联系……。在紧急情况下，我们会快速响应。

#### 4-4. 发布后监控

发布后初期可能会出现意料之外的错误或性能问题。建议重点监控以下项目。

* 主要错误日志和崩溃日志
* 通过 Sentry 设置进行 Sentry 监控
* API 响应延迟·失败率
* 用户反馈和可用性问题
  * 可通过导航栏的“举报”功能收集用户意见。
  * 收到的反馈可在控制台的“举报记录”菜单中查看。
* 外部资源·CDN 加载延迟或失败问题

#### 4-5. 事后审核

为了向用户提供高质量的迷你应用体验，Apps in Toss 在发布后也会继续进行迷你应用审核。如果在事后审核中发现需要改进的地方，可能会向您提出改进请求。若发现违反法律·政策的事项，可能会根据运营政策先采取紧急停运措施。


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://developers-apps-in-toss.toss.im/guide/zh/operation/deploy.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
