with Apple in Xamarin forms iOS - error 1000.

Pramod Singh 0 Reputation points

I have created a project on Xamarin forms with reference to this link for "Sign in with apple" functionality

and while testing it on simulator and as well as on device, I am getting this exception error message while testing Sign in with Apple functionality

"The operation couldn’t be completed ( error 1000.)"

below is my sample code -

[assembly: Xamarin.Forms.Dependency(typeof(AppleSignInServiceiOS))]
namespace MyCaseStatus.iOS.Services
    public class AppleSignInServiceiOS : IAppleSignInService
//#if __IOS__13
		AuthManager authManager;

        bool Is13 => UIDevice.CurrentDevice.CheckSystemVersion(13, 0);
        WebAppleSignInService webSignInService;

        public AppleSignInServiceiOS()
            if (!Is13)
                webSignInService = new WebAppleSignInService();

        public async Task<AppleAccount> SignInAsync()
            // Fallback to web for older iOS versions
            if (!Is13)
                return await webSignInService.SignInAsync();

            AppleAccount appleAccount = default;
				//#if __IOS__13
				var provider = new ASAuthorizationAppleIdProvider();
				var req = provider.CreateRequest();

				authManager = new AuthManager(UIApplication.SharedApplication.KeyWindow);

				req.RequestedScopes = new[] { ASAuthorizationScope.FullName, ASAuthorizationScope.Email };
				var controller = new ASAuthorizationController(new[] { req });

				controller.Delegate = authManager;
				controller.PresentationContextProvider = authManager;


				var creds = await authManager.Credentials;

				if (creds == null)
					return null;

				appleAccount = new AppleAccount();
				//appleAccount.IdToken = JwtToken.Decode(new NSString(creds.IdentityToken, NSStringEncoding.UTF8).ToString());
				appleAccount.Email = creds.Email;
				appleAccount.UserId = creds.User;
				appleAccount.Name = NSPersonNameComponentsFormatter.GetLocalizedString(creds.FullName, NSPersonNameComponentsFormatterStyle.Default, NSPersonNameComponentsFormatterOptions.Phonetic);
				appleAccount.RealUserStatus = creds.RealUserStatus.ToString();
			catch (Exception ex) {
				string Excep = ex.Message;
            return appleAccount;

        public bool Callback(string url) => true;

        //Task<AppleAccount> IAppleSignInService.SignInAsync()
        //    throw new NotImplementedException();

//#if __IOS__13
	class AuthManager : NSObject, IASAuthorizationControllerDelegate, IASAuthorizationControllerPresentationContextProviding
		public Task<ASAuthorizationAppleIdCredential> Credentials
			=> tcsCredential?.Task;

		TaskCompletionSource<ASAuthorizationAppleIdCredential> tcsCredential;

		UIWindow presentingAnchor;

		public AuthManager(UIWindow presentingWindow)
			tcsCredential = new TaskCompletionSource<ASAuthorizationAppleIdCredential>();
			presentingAnchor = presentingWindow;

		public UIWindow GetPresentationAnchor(ASAuthorizationController controller)
			=> presentingAnchor;

		public void DidComplete(ASAuthorizationController controller, ASAuthorization authorization)
			var creds = authorization.GetCredential<ASAuthorizationAppleIdCredential>();

		public void DidComplete(ASAuthorizationController controller, NSError error)
			=> tcsCredential?.TrySetException(new Exception(error.LocalizedDescription));

I have checked all possible solution for this error but still getting same error every time.

can anyone please help or provide any solution for this error.

I will be very thankful if anyone can provide me a link or reference for solving this error.


A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,164 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Wenyan Zhang (Shanghai Wicresoft Co,.Ltd.) 22,651 Reputation points Microsoft Vendor


    error 1000 means that the authorization attempt failed for an unknown reason. And it's usually caused by the code sign /provisioning profile.

    From the sample link you post, you are trying to sign In with Apple in Xamarin.Forms. Please check that you have setup for iOS and selected a correct Provisioning Profile.

    If you have any other issues, please feel free to post in here.

    Best Regards,

    Wenyan Zhang

    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments