Search Unity

Does Unity plan to support Sign in with Apple as a part of the social api?

Discussion in 'iOS and tvOS' started by James15478, Sep 17, 2019.

  1. James15478

    James15478

    Joined:
    Apr 2, 2013
    Posts:
    91
    Questions is the title:
    Does Unity plan to support Sign in with Apple as a part of the social api? (or support it in general?)
     
  2. davidro_unity

    davidro_unity

    Unity Technologies

    Joined:
    Apr 18, 2019
    Posts:
    22
    kaarloew and aihodge like this.
  3. James15478

    James15478

    Joined:
    Apr 2, 2013
    Posts:
    91
    Sweeeeet! Best reply one could ask for :) Thank you!
     
    aihodge likes this.
  4. guy_moon

    guy_moon

    Joined:
    Jan 12, 2020
    Posts:
    1
    From my personal experience with the plugin I can say it has some problems.

    The GetCredentialState method is calling to another get credentials state which in turn calls back to GetCredentialState which results in infinite loop of calls or throws an exception. No call to GetCredentialState is done. Get credential state does not result in the native sign in window so can't be used for the first login. a possible fix that seems to work is to call the internal method like its done on the login process:

    Code (CSharp):
    1. /// <summary>
    2.         /// Invoke login and provide a custom callback when action is completed.
    3.         /// When a custom trigger is used, the onCredentialState or onError unity event won't trigger.
    4.         /// </summary>
    5.         /// <param name="userID">The user id to query the credential state on.</param>
    6.         /// <param name="callback">The custom callback to trigger when action is completed.</param>
    7.         public void GetCredentialState(string userID, Callback callback)
    8.         {
    9.             if (s_CredentialStateCallback != null)
    10.                 throw new InvalidOperationException("Credential state fetch called while another request is in progress");
    11.             s_CredentialStateCallback = callback;
    12.  
    13.             [B]GetCredentialStateInternal(userID); // This was GetCredentialState(userID) originally..[/B]
    14.         }
    The last update for the plugin was on October 15th. Is there a planned update that fixes this issue soon? Will the plugin be available on package manager in the future?

    p.s. The asset is also missing support for automatically adding the apple sign capability in to the Xcode project on older versions(including 2018.4.0f1) since “Apple Sign In” is not included in the PBXCapabilityType class, will this be patched to the asset in the future or will only be supported on the newer unity versions? FYI there is a community plugin addressing this issue and other ones as well.
     
  5. pistoleta

    pistoleta

    Joined:
    Sep 14, 2017
    Posts:
    539
    I'm a bit concerned about this, reading about how many issues has the asset unity recommends on their official blog, and we are supposed to add apple sign in with it? It's quite concerning.

    Whats the community plugin you talk about?

    Thanks
     
  6. ncortesp

    ncortesp

    Joined:
    Oct 28, 2016
    Posts:
    42
    Any news about this? We need to implement this sooner and we have also experienced issues with the plugin.
     
  7. pistoleta

    pistoleta

    Joined:
    Sep 14, 2017
    Posts:
    539
    We have been told by the guys of the Stan's iOS native asset they are implementing that functionality and will be on next update.
     
  8. Masterfalcon

    Masterfalcon

    Unity Technologies

    Joined:
    Dec 29, 2014
    Posts:
    364
    An update is coming soon to fix the infinite loop when checking credential state. So sorry for that's it's caused problems for people.

    In the mean time it is a very simple fix. In SignInWithApple.cs find the function:
    Code (CSharp):
    1. public void GetCredentialState(string userID, Callback callback)
    Change
    Code (CSharp):
    1. GetCredentialState(userID);
    to
    Code (CSharp):
    1. GetCredentialStateInternal(userID);
    Again, very sorry that this bug slipped through and for the late fix.
     
  9. andymads

    andymads

    Joined:
    Jun 16, 2011
    Posts:
    1,614
    Is there no option for the player to 'sign out'?
     
  10. angelkyriako

    angelkyriako

    Joined:
    May 21, 2013
    Posts:
    7
    @andymads There is no need to do so since the script does not keep the state of whether the player logged in.
    Just delete the data you stored(probably the UserInfo) after using the library.
    That should be enough for logout.
     
  11. andymads

    andymads

    Joined:
    Jun 16, 2011
    Posts:
    1,614
    Some questions:

    What's the minimum supported Unity version? I just imported into 2018.4 and the namespace System.Collections.Concurrent is unknown. Or, presumably it required .NET 4.x?

    Is it ok to draw button icon and text ourselves? The text will need to be localized.

    Why, when successfully signing-in, is the credential state of the CallbackArgs object 'Revoked'? It's only when querying the credential state afterward that it's changed to 'Authorized'.
     
    Last edited: Feb 6, 2020
  12. andymads

    andymads

    Joined:
    Jun 16, 2011
    Posts:
    1,614
  13. liortal

    liortal

    Joined:
    Oct 17, 2012
    Posts:
    3,562
    @Masterfalcon are there any plans to update this plugin? for example, adding support for "xcode project processing" to add the required entitlements ?
     
  14. hantengx

    hantengx

    Joined:
    Mar 13, 2017
    Posts:
    10
    I try add this function by the blog post, now it's ok, but user name and email are empty
     
  15. Ceciaman

    Ceciaman

    Joined:
    Jul 30, 2013
    Posts:
    52
    Hi,
    when i use Sign in with AppleID the procedure is OK.
    It return:
    Sign in with Apple login has completed.
    UnityEngine.SignInWithApple.Callback:Invoke(CallbackArgs)
    UnityEngine.SignInWithApple.SignInWithApple:LoginCompletedCallback(Int32, UserInfo)

    the args return some variables:
    idToken **********************************************wbGUuY29tIiwiYXVkIjoiaXQuZWZmZWdyb3VwLnV3YWxsIiwiZXhwIjoxNTg2MjYwMzYxLCJpYXQiOjE1ODYyNTk3NjEsInN1YiI6IjAwMTAyMy5jY2EyNjM5ZGRlN2M0ODA2ODRjY2M0NmE2NzQyZDlmOS4yMzA4IiwiY19oYXNoIjoiMXBDbC1KQjMwU2dKeTl1Y2cxYV9mdyIsImVtYWlsIjoiYWpqZTNqaTloeUBwcml2YXRlcmVsYXkuYXBwbGVpZC5jb20iLCJlbWFpbF92ZXJpZmllZCI6InRydWUiLCJpc19wcml2YXRlX2VtYWlsIjoidHJ1ZSIsImF1dGhfdGltZSI6MTU4NjI1OTc2MSwibm9uY2Vfc3VwcG9ydGVkIjp0cnVlfQ.T3JuRitmhy_ns7HcgPezsHjOAE7rGck_SMOP0xv_*XPcjKJlfvO2u_iyyr3OrcKMnVKBZfzKW0FeLaFWUoNuhx7tad-8tf1Gau3lJyh52QJN4KLYcdqzzMR8WKTaenwFlFz3y-ISID08tOvpFa0LQFQ6jH1BisCwOwPXPvcD_AF8ZqarmYlFkYQscA_VFfmaMkG0K0tbJOv043SxEoqYpy-4mazUUK9GJlJOsgKMQagMQ8RcZJ68XQYF8aniKsAr-pkZ_aV0BiT7iP3ifmDspmcglKTZrgT2-sC6WcUsJemg displayName =
    email =
    userId =**********39dde7c480684ccc46a6***********
    userDetectionStatus =Unknown

    When i try to Callback real variables i recived:
    2020-04-07 13:47:52.681289+0200 uwall[864:230003] [core] Credential State request returned with error: Error Domain=AKAuthenticationError Code=-7030 "(null)"
    User credential state is: NotFound
    SignInWithAppleTest:OnCredentialState(CallbackArgs)
    UnityEngine.SignInWithApple.Callback:Invoke(CallbackArgs)
    UnityEngine.SignInWithApple.SignInWithApple:GetCredentialStateCallback(UserCredentialState)

    What can i do?
     
    Sharpos likes this.
  16. amateurhr

    amateurhr

    Joined:
    Jun 28, 2013
    Posts:
    24
    Will Unity's asset store plugin support Unity Cloud Build or does this mean we have to manually create our production releases in Xcode?
     
  17. Thaina

    Thaina

    Joined:
    Jul 13, 2012
    Posts:
    1,163
    Hello, this was nearly a year, does this package was include in package manager in some way? I can't find any progress or info about this package becoming UPM
     
  18. slava_pankratov

    slava_pankratov

    Joined:
    Jan 17, 2015
    Posts:
    47
    so.... ? ))
     
  19. Cuicui_Studios

    Cuicui_Studios

    Joined:
    May 3, 2014
    Posts:
    72
    So, we were taking a look at the Firebase docs for the Sign in with Apple feature here, which sends us to a Unity blog post, which sends us itself to the asset from the asset store... which is not available anymore. Cannot find anything related in the iOS section of the manual.
    Is there a way to add the Sign in with Apple that we haven't found?
     
  20. andymads

    andymads

    Joined:
    Jun 16, 2011
    Posts:
    1,614
    We've used the Unity solution in several projects - I didn't realise it's been deprecated.

    I found this on github recently and I'm just experimenting with it at the moment.
     
  21. khunjuice

    khunjuice

    Joined:
    Jun 28, 2017
    Posts:
    1
  22. andymads

    andymads

    Joined:
    Jun 16, 2011
    Posts:
    1,614
    Following up on my own post: the linked solution works well.
     
    roointan likes this.