Skip to content

Apple login on IOS

Letโ€™s break down what you are going to need in order to setup Apple login on IOS.

  1. Configure the capabilities of your app.

    In order to do this, please open Xcode, click on App App XCode

  2. Make sure that you select the right target.

    XCode App Target

  3. Please make sure that you add the Sign in with Apple capability.

    App XCode Add Capability

    App XCode Add Capability

  4. Initialize the Apple Login in your app.

    // onMounted is vue specific
    onMounted(() => {
    SocialLogin.initialize({
    apple: {}
    })
    });
  5. Create a button that will begin the login process.

    Said button should call the following function:

    async function loginApple() {
    const res = await SocialLogin.login({
    provider: 'apple',
    options: {}
    })
  6. Run your app on a PHYSICAL device and test it.

    If you followed the steps closely you will see the following screen after clicking your button.

    Apple Sign In prompt on iOS device

Thatโ€™s it! You are all set.

If you are using Apple login on IOS to plan authentication and account flows, connect it with Using @capgo/capacitor-social-login for the native capability in Using @capgo/capacitor-social-login, @capgo/capacitor-social-login for the implementation detail in @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 Two-factor authentication for the implementation detail in Two-factor authentication.