1

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)
}

enter image description here

  • Did u try the solutions mentioned [here](https://stackoverflow.com/questions/59321233/com-apple-authenticationservices-authorization-error-code-1000)? – udi Feb 11 '22 at 10:23
  • Yes @udi capabilities added under all the section, ALL, Debug, and Release – Sudhir Dadhania Feb 11 '22 at 11:09

0 Answers0