-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Update first-pr.md * Create build.md * Create debug.md * Update debug.md * Update first-pr.md
- Loading branch information
1 parent
a09413e
commit 36b6a35
Showing
3 changed files
with
34 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# 编译本项目 | ||
开发的第一步是编译!无论您是想要为喵哩喵哩贡献,或是想自己修改部分代码,您都需要在此之前成功编译喵哩喵哩。本文档提供了一些编译帮助。 | ||
## 先决条件 | ||
### 设备 | ||
您需要一台能够运行当前**最新版** macOS 的 Mac 进行编译。 | ||
### 环境 | ||
您的 Mac 需要安装最新版本的 Xcode,并在 Xcode 中安装最新版 **watchOS** 和 iOS 的 SDK。 | ||
## 编译步骤 | ||
1. Clone 本存储库到本地 | ||
2. 打开`DarockBili.xcodeproj` | ||
3. 等待依赖包处理(需要一个良好的网络环境) | ||
4. 在**项目设置**中选择您自己的开发团队 | ||
5. 开始编译! | ||
## 疑难解答 | ||
上面的步骤应该能直接完成项目的编译,如果您在编译中遇到问题,您可以**搜索错误信息**以尝试找到解决方案。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# 调试 | ||
在成功编译后,您就可以开始调试喵哩喵哩了。本文档包含一些与调试相关的帮助。 | ||
## 选择目标平台 | ||
您可以在 SwiftUI Preview, 模拟器或是真机上调试喵哩喵哩。根据不同的调试目的,这里有不同的推荐平台。 | ||
- 调试静态 UI 时,可以使用 SwiftUI Preview | ||
- 调试从网络获取数据的视图时,使用模拟器 | ||
- 调试视频播放、图片选取等功能时,使用真机调试 | ||
|
||
在模拟器上运行播放器会出现卡顿问题,您必须使用实机进行调试。 | ||
## 调试输出 | ||
很多时候需要查看变量中的内容,这时我们可以使用调试输出 | ||
|
||
您可以使用`debugPrint(_: Any...)`方法打印变量内容,但请记得在提交之前删除它们。 | ||
|
||
您也可以使用断点调试,在变量的**作用域内**打上断点,并设置断点以运行`lldb`命令(例如使用`po [变量名]`来打印变量)。您无需在提交前特别删除断点,.gitignore文件会跳过断点信息。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters