Unable to create an authentication session on Codemagic when code signing on ios

2,026

You shouldn't worry about the --no-codesign part. Codemagic firsts build the app without signing it and then signs the app.

Your problem seems more related to the connection with your apple account. You have to set App Store Connect with an App Specific Password instead of your usual password.

To do so, go to your apple id page, down to Security, and then App Specific Password > Generate a password

Share:
2,026
Sercan Ozdemir
Author by

Sercan Ozdemir

Computer Engineer

Updated on December 16, 2022

Comments

  • Sercan Ozdemir
    Sercan Ozdemir over 1 year

    I feel like I'm missing something but can't be sure really. I'm trying to use automatic code signing feature of codemagic for IOS app store release.

    But during build it prints;

    > /usr/local/bin/flutter build ios --release --no-codesign
    
    Warning: Building for device with codesigning disabled. You will have to manually codesign before deploying to device.
    

    And during publish it prints;

    "Error Domain=ITunesSoftwareServiceErrorDomain Code=-22020 \"We are unable to create an authentication session.\" UserInfo={NSLocalizedDescription=We are unable to create an authentication session., NSLocalizedFailureReason=Unable to validate your application.}"
    

    I'm enabling app store connect, choosing automatic code signing and choosing app store for provisioning profile type. And I'm sure my ID and other fields are correct.

    Any help would be appreciated.