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

Path to the final IPA file

Discussion in 'Unity Build Automation' started by Wolar, Oct 2, 2019.

  1. BillionEyes

    BillionEyes

    Joined:
    Nov 2, 2022
    Posts:
    6
    Yo i got an error that says,
    Error uploading '/BUILD_PATH/{i removed it lol for privacy}/.build/last/{Lets just say its "Bob"}/build.ipa'.
    *** Error: Unable to upload archive. The file '/BUILD_PATH/{I removed it for privacy reason}/.build/last/"Bob"/build.ipa' cannot be found. (-43)

    I am having trouble and i keep getting this error, im using unity on windows btw. I have a post build bash script.
    Any tips please!!!!!











     
  2. BillionEyes

    BillionEyes

    Joined:
    Nov 2, 2022
    Posts:
    6

    can i see ur post build script please
     
  3. tonemcbride

    tonemcbride

    Joined:
    Sep 7, 2010
    Posts:
    1,077
    As mentioned in the last page, Unity now uses the target name for the executable so 'build.ipa' no longer works. Something like this should work ok though: https://forum.unity.com/threads/path-to-the-final-ipa-file.754331/page-2#post-8658531
     
    SuperRaffles likes this.
  4. Benjamin-Gooding

    Benjamin-Gooding

    Unity Technologies

    Joined:
    Apr 12, 2022
    Posts:
    242
    You should use the "UNITY_PLAYER_PATH" environment variable. I'd recommend surrounding the variable with quotes when called from your script as the path could potentially contain spaces.
     
    SuperRaffles likes this.
  5. SuperRaffles

    SuperRaffles

    Joined:
    Jul 25, 2019
    Posts:
    11
    Sure, it's just this. You obviously need to setup the relevant environment variables in cloud build.

    Code (CSharp):
    1. #!/bin/bash
    2. echo "Uploading IPA to Appstore Connect..."
    3. path="${UNITY_PLAYER_PATH}"
    4. if xcrun altool --upload-app --type ios -f $path -u $ITUNES_USERNAME -p $ITUNES_PASSWORD ; then
    5.     echo "Upload IPA to Appstore Connect finished with success"
    6. else
    7.     echo "Upload IPA to Appstore Connect failed"
    8. fi
     
  6. EHOVarollo

    EHOVarollo

    Joined:
    May 16, 2018
    Posts:
    2
    I've been having issues with this bash script for a week, every time I ran it, it wouldn't pass authorization, even when I used the app specific password, in case anyone is still having trouble with this, I found out Apple Business Managed ID's won't work for this, you need an actual AppleID, not managed by an organization!
     
    tonemcbride likes this.
  7. manuelgoellnitz

    manuelgoellnitz

    Joined:
    Feb 15, 2017
    Posts:
    365
    Does that script still work?
    I get the error:

    Code (CSharp):
    1. Error: Unable to upload archive. Failed to get authorization for username **** and password. (
    2. [error]     "Error Domain=NSCocoaErrorDomain Code=0 \"Status code: 0\" UserInfo={NSLocalizedDescription=Status code: 0, NSLocalizedFailureReason=The auth server returned a bad status code.}"
    3. ) (-1011)
    4. {
    5.     NSLocalizedDescription = "Unable to upload archive.";
    6. [error]     NSLocalizedFailureReason = "Failed to get authorization for username **** and password. (\n    \"Error Domain=NSCocoaErrorDomain Code=0 \\\"Status code: 0\\\" UserInfo={NSLocalizedDescription=Status code: 0, NSLocalizedFailureReason=The auth server returned a bad status code.}\"\n)";
    7. }
    The credentials are correct.

    And I read that altool is deprecated.
     
  8. manuelgoellnitz

    manuelgoellnitz

    Joined:
    Feb 15, 2017
    Posts:
    365
    I could fix my problem. I needed an application password.