Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    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:
    9
    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:
    9

    can i see ur post build script please
     
  3. tonemcbride

    tonemcbride

    Joined:
    Sep 7, 2010
    Posts:
    1,083
    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:
    289
    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:
    12
    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:
    397
    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:
    397
    I could fix my problem. I needed an application password.
     
  9. diego_jadu

    diego_jadu

    Joined:
    Oct 12, 2023
    Posts:
    1
    I'm getting this weird error. The weirdier thing about it is that one out 3-4 builds actually uploads successfully. Exactly same script. Does any one have an idea how to fix that?


    /BUILD_PATH/*****/./Tools/upload-ucb-ipa.sh: line 18: 9116 Segmentation fault: 11 xcrun altool --upload-app --type ios --file "$UNITY_PLAYER_PATH" --username $APP_STORE_USER --password $APP_STORE_PASS
    [error] [2024-03-15T01:21:29.424Z] - 7.3.36.2.7.4 - ERROR: User script exited with status 139. Aborting.
    [error] [2024-03-15T01:21:29.477Z] - 7.3.36.2.7.4 - ERROR: Build of 'ios-production' failed. unexpected token at ''