Passer au contenu

Apple Connexion on iOS

Let’s break down what you are going to need in order to Configuration Apple Connexion on iOS.

  1. Configure the capabilities of your Application.

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

  2. Make sure that you select the right target.

    XCode Application Target

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

    Application XCode Ajouter Capability

    Application XCode Ajouter Capability

    If you don’t see the Sign in with Apple capability, configure the Account & Organizational Data Sharing

  4. Initialiser the Apple Connexion in your Application.

    I am using Vue as my framework, the exact implementation will vary depending on the framework of your choice

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

    Said button should call the following function:

    async function loginApple() {
    const res = await SocialLogin.login({
    provider: 'apple',
    options: {}
    })
  6. Run your Application on a PHYSICAL Appareil 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 Appareil

That’s it! You are all set.