Apple Sign in Error: The Operation couldn't be completed (com.apple.AuthenticationServices.AuthorizationError error 1000.)

I am facing one issue while trying to Sign in with Apple. error is as below: "The Operation couldn't be completed (com.apple.AuthenticationServices.AuthorizationError error 1000.)"

I get this error as soon as the button is pressed it doesn't even get into the actual sign-in part.

I have verified that entitlements file is there with the below content:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "">
<plist version="1.0">
<dict>
	<key>aps-environment</key>
	<string>development</string>
	<key>com.apple.developer.applesignin</key>
	<array>
		<string>Default</string>
	</array>
</dict>
</plist>

I transferred the project and certificates from another machine. So deleted all the certificates and provisional profiles and recreated them from the new machine but faced an issue.

Also, It only happens in exported (Archived build). When I directly install it from Xcode it is working fine.

I have followed the official apple document to implement it. below is how I'm requesting the authentication:

currentNonce = randomNonceString()

let request = ASAuthorizationAppleIDProvider().createRequest()

request.requestedScopes = [.fullName, .email]

let controller = ASAuthorizationController(authorizationRequests: [request])

request.nonce = currentNonce?.sha256()

controller.delegate = self

controller.presentationContextProvider = self

controller.performRequests()

Below are delegates:

func authorizationController(controller: ASAuthorizationController, didCompleteWithAuthorization authorization: ASAuthorization) {

        switch authorization.credential {

        case let appleIDCredential as ASAuthorizationAppleIDCredential:
            //Authenticated
            break

        default:
            break
        }
}    

func presentationAnchor(for controller: ASAuthorizationController) -> ASPresentationAnchor {
        return self.view.window!
}    

func authorizationController(controller: ASAuthorizationController, didCompleteWithError error: Error) {
       Utils.showAlert(withMessage: error.localizedDescription)
}

Any help would be appreciated

Post not yet marked as solved Up vote post of Parth Trivedi Down vote post of Parth Trivedi
6.6k views
Add a Comment

Replies

I got this error also, you just have to add (sign in capability) in the target runner inside XCODE, and then restart the application.