Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 373
Rob L Avatar asked Jun 24 '20 05:06

Rob L


3 Answers

Uploading to the App Store didn't worked for me following these instructions and using Visual Studio 2019 (16.7.1). I always got

Errors
App Store bundle validation failed for archive XXX
"altool" exited with code 1
We are unable to create an authentication session.

Apple mentions three ways for uploading:

  • Xcode
  • altool
  • Transporter app

The easiest way is to use Xcode. When you have build for Release and archived your application (in VS 2019 on your Windows machine), you can do this on your Mac in Xcode: Window > Organizer > Archives > Distribute App

like image 82
testing Avatar answered Nov 19 '22 13:11

testing


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.

like image 44
Mihail Duchev Avatar answered Nov 19 '22 12:11

Mihail Duchev


Make sure:

  1. You use App Specific Password.
  2. Make sure you INCREACE THE VERSION AND THE BUILD NUMBERS in info.plist
like image 6
Ljupcho Hristov Avatar answered Nov 19 '22 12:11

Ljupcho Hristov