fix(ios): 修复点击录音时的权限回调闪退
continuous-integration/drone/push Build is passing Details

This commit is contained in:
dongjf 2026-11-26 15:50:32 +08:00
parent 4e33ec4ecb
commit 6c161d1c5f
3 changed files with 7 additions and 3 deletions

View File

@ -117,7 +117,7 @@
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 5;
CURRENT_PROJECT_VERSION = 6;
GENERATE_INFOPLIST_FILE = YES;
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ATLAS_API_BASE_URL = "https://api-atlas.tutudog.com";
@ -138,7 +138,7 @@
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 5;
CURRENT_PROJECT_VERSION = 6;
GENERATE_INFOPLIST_FILE = YES;
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ATLAS_API_BASE_URL = "https://api-atlas.tutudog.com";

View File

@ -34,7 +34,10 @@ final class VoiceCapture {
return
}
let authorized = await withCheckedContinuation { continuation in
SFSpeechRecognizer.requestAuthorization { status in continuation.resume(returning: status == .authorized) }
// Speech can invoke this callback off the main actor.
SFSpeechRecognizer.requestAuthorization { @Sendable status in
continuation.resume(returning: status == .authorized)
}
}
guard sessionID == id else { return }
guard authorized else {

View File

@ -29,5 +29,6 @@ R01–R09 对应[需求与验收](../product/requirements.md)。实现和当前
| TC-23 搜索评分与空间 | R04 | 同一空间创建完整名称、别名、前缀和包含同一词的物品。另测查询位置、百分号及从其他账号查该空间。 | 结果按得分排序,位置可搜,百分号按字面匹配,跨空间读取被拒绝。 |
| TC-24 语音和自动保存 | R06 | 点麦克风说「我把两根转接线放在书房右抽屉」。分别关闭和开启自动保存,再测试「好像」和同名抽屉。 | 完整路径唯一时按设置确认或自动保存,成功才弹出回执。否定、模糊位置、只转写部分等情况保留手动核对。 |
| TC-25 按账号邀请 | R01 | 所有者邀请查看者,另一个账号尝试读取和接受。被邀请者同时接受两次,并尝试写入。 | 只有本人看到邀请并加入,两次接受返回同一成员,查看者不能写入。 |
| TC-26 iOS 录音权限 | R06 | 在真机首次点「开始录音」,允许麦克风和语音识别。停止后再次录音。随后在设置关闭语音识别,回到录入页再点一次。 | 授权后可录音和重录。拒绝权限时保留录入页,提示开启权限或直接打字。 |
[测试与演示计划](plan.md)