I am implementing sign with apple using unity 2019.2.3. My question is how to disable apple sign in button when device os version is not iOS 13?
UnityEngine.iOS.Device.systemVersion https://docs.unity3d.com/ScriptReference/iOS.Device-systemVersion.html
I need to check for every iOS 13 version and what will happen when iOS 14 will launch? How can I implement like this if iOS version > = 13.0 sign in button will work?
If I understand your concerns correctly, the systemVersion is a string which you can parse, not an Enum that you need to explicitly write switch cases for, so you don't need to update the code for every iOS version number. You can use the Version class provided by the .NET Framework to do easy comparison, like so: Code (CSharp): using System; using UnityEngine.iOS; ... Version currentVersion = new Version(Device.systemVersion); // Parse the version of the current OS Version ios13 = new Version("13.0"); // Parse the iOS 13.0 version constant if(currentVersion >= ios13) { // Enable the button... } BTW, Apple gives developers 3 months to test with iOS beta every June after WWDC and submit app updates about two weeks prior to making the update public in late September. If you need to make sure your code works with the upcoming iOS, you should have plenty of time to test.
Quick question: Are you using the unity SignInWithApple package? Because we've been trying to implement it and haven't been able to make it work.
Seems like this should be included in the Unity plugin with a method like IsSignInWithAppleAvailable()
Exactly! I was looking for such method and was surprised that it's not there. Or I can't find it. In the end I went with the solution proposed by @Neonlyte
SignInWithApple is a very very basic plugin, I am using it just for the sake of using the "official" Unity plugin, but I was hoping the "upcoming" User Authentication was going to be released months ago... I assume that's why they did not write a more complete SignInWithApple solution quite yet.