Rob L
Rob L

Reputation: 2372

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?

Upvotes: 24

Views: 18871

Answers (7)

gadildafissh
gadildafissh

Reputation: 2402

The way I solved this error was to fix my Bundle Signing settings to what Microsoft listed here: https://learn.microsoft.com/en-us/dotnet/maui/ios/deployment/publish-app-store?tabs=vs

My settings in Windows VS, but things may be a bit different between Windows VS and Mac VS

Upvotes: 1

Meekohi
Meekohi

Reputation: 10883

I got this (fairly cryptic) error message when I was using an incorrect "App Specific Password".

Upvotes: 0

B Conrad
B Conrad

Reputation: 21

With the most recent VS 2019 on Windows and Xcode on Mac, Show IPA file on Build was not highlighted nor was the icon for it in the menu bar. But when I launched VS again the both were highlighted and the folder displayed on the Mac when executed. Perhaps there is a latency problem with VS where you need to restart it for the feature to work.

Upvotes: 0

Ljupcho Hristov
Ljupcho Hristov

Reputation: 275

Make sure:

  1. You use App Specific Password.
  2. Make sure you INCREACE THE VERSION AND THE BUILD NUMBERS in info.plist

Upvotes: 9

Shadesz
Shadesz

Reputation: 55

I used the Transporter App because nothing else was working. The upload failed again, but Transporter actually showed a great error message... my build version number had to be updated in Info.plist (oops!).

After updating the version number and re-archiving, the Distribute button worked as intended.

To use the Transport App

  1. Download Transport App (made by Apple) from App store and open it on the mac
  2. Build the iOS project in release mode on Visual Studio
  3. Right-click the iOS project in Visual Studio and Show IPA on Build Server
    • If Show IPA on Build Server is greyed-out/disabled navigate to the file directly on your mac instead...
      • Open Finder
      • Click Go > Go to Folder... on the toolbar
      • enter ~/Library/Caches/Xamarin/mtbs/builds/
      • Continue navigating to the release folder... {app name}/bin/{iPhone}/Release
      • Find the file with the .ipa extension
  4. Drag the IPA file into the open Transporter app
  5. Click Deliver
  6. If failed, click the Issue button to see why

Upvotes: 4

testing
testing

Reputation: 20289

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

Upvotes: 42

Mihail Duchev
Mihail Duchev

Reputation: 4821

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.

Upvotes: 15

Related Questions