# 跑通示例项目 (/zh-CN/solutions/one-to-one-live/rtm/get-started/run-example/ios) > For AI agents: see the complete documentation index at [llms.txt](/llms.txt). 声网在 `agora-ent-scenarios` 仓库中提供 1v1 私密房和秀场转 1v1 的源代码供你参考。 本文介绍如何快速跑通该示例项目,体验直播效果。 ## 前提条件 [#前提条件-1] 开始前,请确保满足如下前提条件: - 参考[开通一对一直播服务](/zh-CN/solutions/one-to-one-live/rtm/build/setup-and-access/enable-service)在控制台创建项目,获取 App ID 和 App 证书,并[开通项目的 RTM 服务权限](/zh-CN/solutions/one-to-one-live/rtm/build/setup-and-access/enable-service#开通-rtm-服务权限) - [Git](https://git-scm.com/downloads) - [CocoaPods](https://guides.cocoapods.org/using/getting-started.html#getting-started) - [Xcode](https://apps.apple.com/cn/app/xcode/id497799835?mt=12) 12.0 及以上 - 有效的苹果开发者账号 - iOS 设备,版本 13.0 及以上 :::warning[注意] 声网推荐使用真机运行项目。部分模拟机可能存在功能缺失或者性能问题。 ::: ## 克隆仓库 [#克隆仓库-1] 运行以下命令克隆仓库到本地: ```shell git clone git@github.com:AgoraIO-Usecase/agora-ent-scenarios.git ``` ## 配置示例项目 [#配置示例项目-1] 按照如下步骤进行配置: 1. 运行项目前,你需要在 `agora-ent-scenarios/iOS/AgoraEntScenarios/KeyCenter.swift` 文件中设置如下参数: ```swift static let AppId: String = "<#YOUR APPID#>" static let Certificate: String? = "<#YOUR Certificate#>" ``` 你可以在[创建声网项目](/zh-CN/solutions/one-to-one-live/rtm/build/setup-and-access/enable-service#创建声网项目)后,从控制台获取这些参数的值,详情如下: | 参数 | 描述 | 获取方式 | |----|----|----| | `AppId` | 声网项目的 App ID | [获取 App ID](/zh-CN/solutions/one-to-one-live/rtm/build/setup-and-access/enable-service#获取-app-id) | | `Certificate` | 声网项目的 App 证书 |[获取 App 证书](/zh-CN/solutions/one-to-one-live/rtm/build/setup-and-access/enable-service#获取-app-证书) | 2. 在 `agora-ent-scenarios/iOS` 目录下运行 `pod install`,然后等待依赖库安装完成。 ## 编译并运行示例项目 [#编译并运行示例项目-1] 按照如下步骤进行操作: :::warning[注意] 声网 1v1 私密房和秀场转 1v1 示例项目基于 RTC 和 RTM SDK 开发。运行前请确保你的项目已[开通 RTM 服务权限](/zh-CN/solutions/one-to-one-live/rtm/build/setup-and-access/enable-service#开通-rtm-服务权限)。 ::: ![](https://web-cdn.agora.io/docs-files/1685431554693) 1. 连接上 iOS 设备后,点击 `AgoraEntScenarios.xcworkspace` 文件以通过 Xcode 打开项目,并在 **iOS Device** 选项中勾选上你的 iOS 设备。 2. 在项目 **TARGETS** 下的 **Signing & Capabilities** 界面勾选 **Automatically manage signing**,配置你的苹果开发者账号和 **Bundle Identifier**。Bundle ID 用于在设备上唯一标识应用程序。在开发应用时,你需要设置 Bundle ID。在此处设置的 Bundle ID 需要与你当前应用实际使用的 Bundle ID 保持一致。 3. 点击 开始编译。 :::info[信息] 如果之前运行过声动互娱项目,Xcode 可能在编译时会报 `AUIMoreDialog has different definitions ...` 的错。你可以使用 `cmd` + `shift` + `K` 清理后再尝试编译。 ::: 4. 编译成功后,你的 iOS 设备上会出现**声动互娱**应用。在 iOS 系统设置中将该应用设为信任开发者后你才能打开应用。 5. 打开**声动互娱**应用,点击 **1v1 私密房**或**秀场转 1v1 私密房**,即可进行体验。主播可以创建房间;观众可以加入房间。 :::warning[注意] 你需要在两个客户端都打开**声动互娱**,且都选择 **1v1 私密房**或**秀场直播转 1v1 私密房**才能进行互动体验。 ::: ## 常见问题 [#常见问题] ### 签名报错 [#签名报错] 使用 Xcode 14 编译失败,遇到 **Signing for "SenseLib-SenseLib" requires a development team** 的签名报错,如下面截图所示: ![](https://web-cdn.agora.io/docs-files/1685614210647) #### 解决方案 [#解决方案] 你可以通过在 Terminal 中执行如下命令将 CocoaPods 升级到 1.12.0 以上解决报错。 ```shell sudo gem install -n /usr/local/bin cocoapods ``` #### 备选解决方案 [#备选解决方案] 如果遇到 CocoaPods 升级失败,你还可以通过手动给第三方库签名来解决报错。将 **Signing > Team** 设置为你的开发团队即可。