> For the complete documentation index, see [llms.txt](https://docs.convai.com/api-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.convai.com/api-docs/zh/cha-jian-yu-ji-cheng/unity-plugin/building-for-supported-platforms/microphone-permission-issue-on-intel-macs-with-universal-builds.md). Agents can also search and read this documentation through its [MCP server](https://docs.convai.com/api-docs/~gitbook/mcp).

# 为 macOS 通用应用构建

## 概述

为 macOS 构建 Unity 项目时，开发者可能会遇到麦克风权限问题，尤其是在同时面向 Intel 和 Apple 芯片 Mac 构建时。本文概述了问题、症状、原因和解决方案，帮助确保麦克风在不同 Mac 架构上都能正常使用。

### 问题描述

有用户反映，在构建 macOS 通用应用时，Apple 芯片 Mac 的麦克风权限正常，但 Intel Mac 可能因架构差异而无法访问麦克风。这可能导致麦克风无响应、出现“找不到 DLL”异常、显示错误消息、应用可能崩溃，或检测不到音频输入。

### 原因

问题源于 `grpc_csharp_ext.bundle`，它对 Unity 项目的网络功能至关重要。该 DLL 针对 Intel 和 Apple 芯片架构分别提供不同版本，无法轻易合并或通用。当前的 grpc 库尚未提供专门支持来解决 Unity 中的这些 DLL 问题。

## 解决方案

### 独立版构建设置

* **对于 Intel Mac：** 使用专门面向 Intel 架构的独立版构建，以确保兼容性。
* **对于 Apple 芯片 Mac：** 建议使用面向 ARM64 架构的独立版构建以获得最佳性能，但也可以选择通用构建。

<figure><img src="https://2402152281-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEtUJA212Zc1S9ACc8T4l%2Fuploads%2FzQliIw8BhhrmuPSIyEIU%2Fimage%20(6).png?alt=media&amp;token=c6e8e2ac-bee4-49c5-be4b-65044357bc2f" alt="" width="563"><figcaption></figcaption></figure>

### 在 Intel Mac 上进行通用构建的新流程

在 Intel Mac 上完成通用构建后，必须手动更新 `grpc_csharp_ext.bundle` 以确保正常运行。请按以下步骤操作：

1. 找到构建过程生成的 `.app` 文件。<br>

   <figure><img src="https://2402152281-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEtUJA212Zc1S9ACc8T4l%2Fuploads%2F0WTM9Ibk4jL52N2MyNv6%2Fimage.png?alt=media&amp;token=3b5069ad-ac30-4852-b24c-db4638fc947d" alt="" width="563"><figcaption></figcaption></figure>
2. 右键点击 `.app` 文件，然后选择“显示包内容”。\ <br>

   <figure><img src="https://2402152281-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEtUJA212Zc1S9ACc8T4l%2Fuploads%2FSx99U6oFewW7V5EBKKww%2Fimage%20(1).png?alt=media&amp;token=c2688137-5b32-4adb-9aa4-3d5ed871ffa5" alt="" width="563"><figcaption></figcaption></figure>
3. 导航到包内的 `Contents/Plugins` 文件夹。\ <br>

   <figure><img src="https://2402152281-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEtUJA212Zc1S9ACc8T4l%2Fuploads%2F3PxDl1H4Nv08Gf3pZ8Or%2Fimage%20(2).png?alt=media&amp;token=195ba9ed-56d4-4eb7-a05d-87635d871ce3" alt="" width="563"><figcaption></figcaption></figure>
4. 将此文件夹的内容替换为所提供插件文件夹中的组件（[插件文件夹链接](https://drive.google.com/drive/folders/1oZSsFbd3SLSagJafwrLq1swdgL0Hr3Hm?usp=drive_link)).<br>

   <figure><img src="https://2402152281-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEtUJA212Zc1S9ACc8T4l%2Fuploads%2F36QtXa9HrgPBimfwTyis%2Fimage%20(3).png?alt=media&amp;token=0eefc561-b4a2-4ed2-9eb6-ffd4dde99910" alt="" width="563"><figcaption></figcaption></figure>

   <figure><img src="https://2402152281-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEtUJA212Zc1S9ACc8T4l%2Fuploads%2FfxyuHZOtIyd5Z1RTzjob%2Fimage%20(4).png?alt=media&amp;token=8e09a0b5-fd1c-41b5-89ea-bbb954ddc856" alt="" width="563"><figcaption></figcaption></figure>

**重要提示：** 从 Intel Mac 进行构建时，最终构建中可能无法正确包含 `grpc_csharp_ext.bundle` 。请务必检查构建中的 `Plugins` 文件夹，确认其中包含正确的 DLL。如果不确定或缺少 DLL，请将 `Plugins` 文件夹中的内容替换为或补充为我们提供的内容。

***

## 总结

为 macOS 构建时，必须仔细考虑 Intel 和 Apple 芯片架构之间的差异。目前的最佳做法是使用针对目标 Mac 架构量身定制的独立版构建设置。随着后续工作推进，我们将提供更集成的 DLL 管理方案，简化 macOS 通用应用的开发流程。


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.convai.com/api-docs/zh/cha-jian-yu-ji-cheng/unity-plugin/building-for-supported-platforms/microphone-permission-issue-on-intel-macs-with-universal-builds.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
