SwiftUI中Apple登录状态校验报错(com.apple.AuthenticationServices.AuthorizationError error 1000)求助
各位开发者朋友好!最近做SwiftUI项目的Apple登录功能时碰到了个头疼的问题,想请教下有没有人遇到过类似情况?
我遇到的报错信息如下:
Error checking credential state: The operation couldn’t be completed. (com.apple.AuthenticationServices.AuthorizationError error 1000.)
目前Apple登录、获取用户邮箱等个人信息、登出功能都能正常跑,完全没毛病,但校验Apple认证状态这一步却总是失败。马上要提交App审核了,担心这个问题会导致审核被拒,急着解决。
我已经做了这些排查:
- 项目里已经添加了「Sign in with Apple」的Capabilities
- 翻了之前相关的问题帖,但没找到能解决问题的方案
下面是我用于校验Apple认证状态的代码片段(部分内容被截断):
func verifySignInWithAppleAuthenticationState() async { let appleIDProvider = ASAuthorizationAppleIDProvider() guard let user = try? await Supabase.shared.client.auth.session.user else { print("DEBUG: No valid userID found.") return } // 后续调用 credentialState(forUserID:) 的逻辑被截断 }
有没有大佬能帮忙分析下可能的问题原因?感谢大家的指点!
备注:内容来源于stack exchange,提问作者Ozy
相关产品推荐
相关产品推荐

