跳过内容

苹果登录IOS

GitHub

为了设置Apple登录IOS,需要什么东西。

  1. 配置应用的能力。

    为了做到这一点,请打开Xcode,点击 App App XCode

  2. 确保您选择了正确的目标。

    XCode App Target

  3. 请确保您添加了 Sign in with Apple 能力。

    App XCode Add Capability

    App XCode Add Capability

  4. 在您的应用程序中初始化 Apple 登录。

    // onMounted is vue specific
    onMounted(() => {
    SocialLogin.initialize({
    apple: {}
    })
    });
  5. 创建一个按钮来开始登录过程。

    说按钮应该调用以下函数:

    async function loginApple() {
    const res = await SocialLogin.login({
    provider: 'apple',
    options: {}
    })
  6. 在一个 物理 设备上运行您的应用程序并测试它。

    如果您仔细遵循了步骤,您应该会在点击按钮后看到以下屏幕。

    Apple iOS 设备上的 Apple Sign In 提示

That’s it! You are all set.

如果您正在使用 Apple iOS 登录 来规划身份验证和帐户流程,连接它到 使用 @capgo/capacitor-social-login 为 @capgo/capacitor-social-login 原生能力 使用 @capgo/capacitor-social-login 为 @capgo/capacitor-social-login 实现细节 @capgo/capacitor-passkey for the implementation detail in @capgo/capacitor-passkey, @capgo/capacitor-native-biometric for the implementation detail in @capgo/capacitor-native-biometric, and 双因素认证 for the implementation detail in 双因素认证。