You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

真机Apple登录报错Code 1000,模拟器运行正常

iPhone 14真机Apple登录报错com.apple.AuthenticationServices.Authorization Error Code 1000(Expo Go + React Native环境)

在iPhone 14真机上执行Apple登录时触发错误:com.apple.AuthenticationServices.Authorization Error Code 1000,但在模拟器中可以正常运行。开发环境为React Native + Expo Go,已尝试以下解决方案:

  • 在Xcode中添加登录权限并重启应用
  • 从iCloud移除其他设备后重新构建项目
  • 在Expo配置文件app.config.js中添加usesAppleSignIn配置,代码如下:
ios: {
    googleServicesFile: "./GoogleService-Info.plist",
    supportsTablet: true,
    bundleIdentifier: "com.dadyzal",
    buildNumber: "7.0.9",
    usesAppleSignIn: true
},
  • 在Xcode中配置开发团队

怀疑是否因缺少Entitlements文件导致该问题?以下是Apple登录相关业务代码:

async function onAppleButtonPress() {
    try {
      console.log("开始发起Apple登录请求...");

      // 执行登录请求
      const appleAuthRequestResponse = await appleAuth.performRequest({
        requestedOperation: appleAuth.Operation.LOGIN,
        requestedScopes: [appleAuth.Scope.FULL_NAME, appleAuth.Scope.EMAIL],
      });

      console.log("已收到Apple返回的响应。");

      console.log(appleAuthRequestResponse);

      const appleCredential = auth.AppleAuthProvider.credential(
        appleAuthRequestResponse.identityToken,
        appleAuthRequestResponse.nonce
      );

       await auth().signInWithCredential(appleCredential);

      // 导航至首页
      navigation.navigate('Home' as never);
      // } else {
      //   console.log("用户未完成认证。");
      // }
    } catch (error) {
      console.error("Apple登录过程出错:", error);
      setError(error.message);
    }
  }

内容的提问来源于stack exchange,提问作者edjav

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.17 01:26:19