Learn what Felgo offers to help your business succeed. Start your free evaluation today! Felgo for Your Business

AppleSignInButton

A pre-configured button for Apple account sign in. More...

Import Statement: import Felgo 4.0
Inherits:

AppButton

Properties

Detailed Description

The Apple sign in plugin lets your users authenticate with their Apple ID.

This is a pre-configured button to handle Apple account sign in.

It uses the functions from an instance of AppleSignIn. You can customize it with the property appleSignIn.

It follows Apple's Button Human Interface Guidelines.

On platforms supporting Apple account sign in, it displays a Button like this:

On unsupported platforms, it is a disabled button with the text "Sign in with Apple not available.". The only supported platforms are iOS 13+.

The button calls AppleSignIn::signIn() when it is clicked. While the user is already authorized, it shows a disabled greyed-out button.

Example Usage

The following example code shows how to integrate the AppleSignInButton and access the current authorization state:

 import QtQuick 2.0
 import Felgo 4.0

 App {
   NavigationStack {
     AppPage {
       title: "Apple Sign In"

       Column {
         anchors.centerIn: parent
         spacing: dp(15)

         AppleSignInButton {
           id: appleSignInButton
           anchors.horizontalCenter: parent.horizontalCenter
         }

         AppText {
           anchors.horizontalCenter: parent.horizontalCenter
           text: appleSignInButton.appleSignIn.isSignedIn
                 ? "Signed in: " + appleSignInButton.appleSignIn.userName
                 :  appleSignInButton.appleSignIn.isAvailable
                 ? "Click above to sign in with Apple user"
                 : "Apple Sign-in unavailable."
         }
       }
     }
   }
 }

Property Documentation

appleSignIn : AppleSignIn

An instance of AppleSignIn.

You can set this to a custom instance you use in your app. You can also leave the default value, in which case it uses a new default instance of AppleSignIn.


[read-only] isAvailable : bool

Contains true if AppleSignIn::signIn() is supported on the current platform.

Supported platforms are only iOS 13+.

Contains false on all other platforms.


Qt_Technology_Partner_RGB_475 Qt_Service_Partner_RGB_475_padded