xamarinxamarin.formsxamarin.ios

Xamarin: Unable to upload Archive to AppStore


Visual Studio 2019 (Windows) / Xamarin 4.7.0.968

I create an iOS Archive (with no errors) but when I choose Distribute / AppStore and select the ID/Profile that I have already set up in Visual Studio, I get prompted for ID/Password as expected. But then it fails with the error:

AppStore bundle validation failed for archive MyApp.Mobile.iOS
"altool" exited with code 1.

Does anyone have any ideas what may be wrong?


Solution

  • Unfortunately, the upload from VS doesn't give you proper message why the upload fails. In order to debug it, you need to upload it "manually". The steps are:

    1. Build your project in Release configuration
    2. Right click on the iOS project and select Show IPA file on Build Server
    3. A Finder window will open on the Mac with the ipa file being preselected.
    4. Copy the file to some location that you can access easily (e.g. your Dekstop)
    5. Open the Terminal
    6. Write the following command: xcrun altool --upload-app --type ios --file "path/to/application.ipa" --username "YOUR_ITMC_USER" --password "YOUR_ITMC_PASSWORD"

    If your application is on the Desktop, the path will look like this: ~/Desktop/application.ipa, where application.ipa is your app's name. Of course, you have to provide your credentials instead of YOUR_ITMC_USER & YOUR_ITMC_PASSWORD .

    When you have run this command, wait a minute or two. After a while the tool will tell you if the upload fails and if so - why exactly.

    P.S. You can also use the GUI Transporter app, but I don't know how much more information it may give you.