Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Question How can I copy AppStoreConnect private key to the correct folder?

Discussion in 'Unity Build Automation' started by boydbuchanan, Sep 29, 2022.

  1. boydbuchanan

    boydbuchanan

    Joined:
    Jun 4, 2017
    Posts:
    2
    I'm trying to upload my app to the Apple Store with a post build script. I was attempting to use the apikey access but I don't know how to put the .p8 Authkey file in the correct directory.

    This is the command I'm running
    xcrun altool --upload-app -f ${UNITY_PLAYER_PATH} -t ios --apiIssuer $IOS_ISSUER_ID --apiKey $IOS_KEY_ID

    This is the error I'm getting

    NSLocalizedFailureReason=The file 'AuthKey_{ID}.p8' could not be found in any of these locations: '~/private_keys', '~/.private_keys', '~/.appstoreconnect/private_keys'.},

    Do I need to run a command to copy the file manually? Would it be in this script or in a pre build script? Or is there some other way to put this file in the right location?

    I don't have access to xcode so I'm hoping to use Cloud Build to Upload. If this doesn't work I don't have a reason to continue using Cloud Build as I'll be forced to use another resource or buy a macbook. I'm not paying for every build I run just to figure this out, I'd rather pay for a macbook.
     
  2. tonemcbride

    tonemcbride

    Joined:
    Sep 7, 2010
    Posts:
    1,077
    Last edited: Sep 29, 2022
    boydbuchanan likes this.