Native Shopify Mobile App with 20 new features
Kickstart your hyperlocal marketplace in Corona pandemic with a starter guide
Android App Development
iOS 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 220.127.116.11 release ready!
Owner and Founder. Opencart
Apple SignIn in Flutter helps to integrate Apple SignIn for iOS Users in the app. Social Login is very common nowadays. Everyone prefers to SignUp 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.
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 getting a brief idea about it.
Thank you for reading!!
Your email address will not be published. Required fields are marked*
Save my name email and website in this browser for the next time I comment.
Be the first to comment.
Very good company, we did get app extension for Magento 2 website. The support was very good they help us through the process. Webkul team is very supportive, I would recommend them.
Enquiry or Requirement
If you have more details or questions, you can reply to the received confirmation email.