使用无密码登录时通过 Apple App Store 审核的技巧¶
在 Apple AppStore 上发布移动应用时,会有一个 App Review 审核流程。您需要提供一个演示账号,供审核人员访问应用的各项功能。
但是,通过邮箱/手机 OTP 实现的无密码登录无法用于审核,因为审核人员无法访问该演示账号的邮箱收件箱或手机号码。
为了解决这个问题,您可以为特定的手机号码或邮箱地址启用「测试模式」,使该账号可以用固定的 OTP(例如 000000)完成身份验证。
如何启用「测试模式」¶
- 进入 Advanced > Edit Config
- 将以下内容粘贴到 yaml 中:
test_mode:
oob_otp:
enabled: true
rules:
- fixed_code: "000000"
regex: (\+85291231234$|me@example\.com$)
sms:
enabled: true
rules:
- suppressed: true
regex: \+85291231234$
whatsapp:
enabled: true
rules:
- suppressed: true
regex: \+85291231234$
email:
enabled: true
rules:
- suppressed: true
regex: me@example\.com$
在这个例子中,
+85291231234和me@example.com不会收到任何消息。- 它们可以使用固定的 OTP
000000登录。 - 其他所有用户仍会正常收到 OTP。