Android App Development
iOS App Development
Flutter App Development
Cross Platform App Development
Hire on-demand project developers and turn your idea into working reality.
Big thanks to Webkul and his team for helping get Opencart 184.108.40.206 release ready!
Apple Sign-In in Flutter helps to integrate Apple Sign-In for iOS Users in the app. Social Login is very common nowadays. Everyone prefers to sign up for the Applications with the help of a Social Login.
It reduces the amount of time a user spends filling out the details in order to Create an Account.
Our Flutter app development company also provides various Social Login compatibility with your app.
There are several types of Social Login supported by Flutter –
Firstly, we will need to enable “Apple Sign In” on Firebase Console.
Step-1 –> Go To “Firebase Console“. Select your Project.
Step-2 –> Click on “Authentication” from the Drawer Menu
Step-3 –> Now, click on “Sign-in method” Tab.
Step-4 –> Here, you will find all the types of authentication which Firebase supports.
We have to select “Apple” and enable it.
Secondly, we will have to also configure “SignIn with Apple” from Apple Developer Account.
Step-1 –> Go to Apple Developer Account and select “Certificates, Identifiers and Profiles”.
Step-2 –> Now, go to Identifiers and select the Identifier linked with your app.
Step-3 –> Select “Sign In with Apple” within the identifier and “Save” it.
Step-4 –> Once you have enabled Sign In with Apple from Apple Developer Account, now you will have to add it in the Xcode Capability Section.
Once we are done with it, we are all set to write our code.
Step-1 –> Firstly, we will need to add the dependency in our pubspec.yaml file
After adding the dependency, run ‘pub get‘ command.
Step-2 –> Now, we will create an Apple Sign In Button which is provided by the dependency.
Here, we have “type” property which specifies what type of button you want signin,default or continue.
“onPressed” will be used to execute the function.
There are some other properties like cornerRadius, style etc.
Apple SignIn is not supported by all the devices so we also need to add a check in order to determine that the SignIn with Apple will work or not on a particular device.
Here, we have added a check for AppleSignIn supported devices and after that if AppleSignIn is supported by the device we have requested for the Email and FullName value.
We can also initialize the Scope Value as per the need with the help of Scope.rawValue(value)
After adding this, now we also have to handle the cases whether the user has logged in successfully or not or is there any exception.
For this we can define some cases, on the basis of the status of login result.
The output of the code is –
In this blog, we have discussed about Apple SignIn in Flutter.
I hope it will help you out in understanding and get a brief idea about it.
Here’s our blog on Google Sign-In in Flutter – https://mobikul.com/google-sign-in-in-flutter/
Thank you for reading!!
We've bought a Shopware Extension which is a hybrid App, which we can now offer in the Google Play Store and the IOS App Store. I'am still impressed how fast and how sharp the support team leads us through every process of the App-Store clarification. Very fast and useful response.
Founder, Das Apartment Living
Enquiry or Requirement
If you have more details or questions, you can reply to the received confirmation email.