0

I know this might not be the best question, not much information, but I will try.

I'm trying to add Apple Sign In to Xamarin.Forms app using Xamarin.Essentials. As of now, I'm just trying to make it work on iOS 13, without going any further yet, server side is not required as I understand for this limited scope.

I looked into the sample app for Xamarin.Essentials, and came to conclusion that specifically for iOS 13 it would be enough to call

            await AppleSignInAuthenticator.AuthenticateAsync();

However, I got an exception "com.apple.AuthenticationServices.AuthorizationError error 1000". Couldn't fine more details.

Then I took Xamarin.Essentials sample app, changed Bundle Id to what I have in my app, and then it worked. This validated that certificates and App store were configured correctly.

I tried to get Xamarin.Essentials from GitHub and debug through the library, the exception is in AppleSignInAuthenticator.ios.cs in "PlatformAuthenticateAsync", at the line

        var creds = await authManager.Credentials;

Update: In entitlements.plist I added

<key>com.apple.developer.applesignin</key>
<array>
    <string>Default</string>
</array>

Any help or advise is appreciated.

4

1 回答 1

2

我是新的,这将是愚蠢的。

我有 Entitlements.Development.plist 和 Entitlements.Production.plist。我应该说更多(没有在任何地方添加com.apple.developer.applesignin的密钥)。

顺便说一句,人们如何处理它,在开发和生产之间为关键的 aps 环境具有单独的价值?

于 2020-04-20T18:53:23.237 回答