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 Cloud Build to Mac App Store (appstoreconnect.apple.com)

Discussion in 'Unity Build Automation' started by mrphilipjoel, Mar 12, 2022.

  1. mrphilipjoel

    mrphilipjoel

    Joined:
    Jul 6, 2019
    Posts:
    36
    Greetings,

    I found other forum posts with post-build scripts that can be used to auto push my cloud built iOS app to appstoreconnect.apple.com They work great.

    I've been trying to get it to work for Mac OS X builds as well, but I keep running into issues.

    Does anyone have a post-build script that works to push Mac OS X Builds?

    Here are the errors I'm getting with my current post-build script.

    246: *** Error: Error uploading '/BUILD_PATH/mrphilipjoel.candyverse.default/.build/last/default/Default'.
    247: *** Error: Unable to upload archive. The file '/BUILD_PATH/mrphilipjoel.candyverse.default/.build/last/default/Default' cannot be found. (-43)
    248: *** Error: Unable to upload archive. Failed to get authorization for username 'philip.herlitz@gmail.com' and password. (
    249: "Error Domain=NSCocoaErrorDomain Code=0 \"Status code: 0\" UserInfo={NSLocalizedDescription=Status code: 0, NSLocalizedFailureReason=The auth server returned a bad status code.}"
    250: NSLocalizedFailureReason = "Failed to get authorization for username 'philip.herlitz@gmail.com' 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)";
    251: publishing finished success

    Here is the bash script i'm using:
    Code (CSharp):
    1. #!/bin/bash
    2. echo "Uploading IPA to Appstore Connect..."
    3. #Path is "/BUILD_PATH/<ORG_ID>.<PROJECT_ID>.<BUILD_TARGET_ID>/.build/last/<BUILD_TARGET_ID>/build.pkg"
    4. path="${UNITY_PLAYER_PATH}"
    5. if xcrun altool --upload-app --type macos -f $path -u $ITUNES_USERNAME -p $ITUNES_PASSWORD ; then
    6.     echo "Upload IPA to Appstore Connect finished with success"
    7. else
    8.     echo "Upload IPA to Appstore Connect failed"
    9. fi
     
  2. Danny327

    Danny327

    Unity Technologies

    Joined:
    Jan 4, 2021
    Posts:
    78
  3. mrphilipjoel

    mrphilipjoel

    Joined:
    Jul 6, 2019
    Posts:
    36
    The reason i am trying to get it to post directly is because from windows, even though i can download the build in unity, or download from cloud build, during the download process, it gets corrupted and mac users can't use it.
     
  4. Oreka

    Oreka

    Joined:
    May 22, 2014
    Posts:
    5
    Hi, we are having the exact same problem, did you finally manage to build the application in Unity cloud build and upload it to the app store?
     
  5. mrphilipjoel

    mrphilipjoel

    Joined:
    Jul 6, 2019
    Posts:
    36
    No. I ended up abandoning the Mac build, and returned to webGL.

    Maybe you'll find this reddit thread useful. I think we were talking more about doing the build on windows, and it should just work on Mac, but the users commenting on this reddit thread might be helpful.
    https://www.reddit.com/r/gamedev/comments/wck1sz/comment/iigefry/?context=3
     
  6. dirty-rectangle

    dirty-rectangle

    Joined:
    Apr 23, 2015
    Posts:
    78