Search code examples
xcodexamarin.formsxamarin.iosvisual-studio-mac

Failed to create IPA archive after upgrade to Xcode 11.4.1, VS for Mac 8.5.4, and Xamarin.iOS 13.16


After upgrading to the latest versions of Visual Studio for Mac, Xamarin, and Xcode, I am unable to create a signed IPA archive. Everything runs on the simulator, everything builds fine in my release configuration. I can even create the archive just fine. But after I click "Sign and Distribute", regardless of whether I try to publish to the App Store or simply save the IPA to disk, I get the extremely generic "Failed to create IPA archive" message with no other detail about what failed.

As always with these types of problems, this worked the last time I tried to publish (2 months ago). Even trying to use "Sign and Distribute" on an archive I previously published successfully to the App Store fails with the same message. Are there any logs for this where I can see exactly what is failing? The Archive output window at the bottom of the screen doesn't show activity for this stage of the process.

UPDATE:

After finding the logs, was able to see the following error that shows that for some reason after upgrading the apps, permissions were somehow lost for creating the zip archive:

zip -r -y "/Applications/Xcode.app/MyApp.ipa" Payload
zip I/O error: Permission denied
zip error: Could not create output file (/Applications/Xcode.app/MyApp.ipa)
zip exited with code 15
ERROR:Failed to create IPA archive.
Finshed

So now the question becomes why, and what steps need to be taken to fix this the proper way (i.e., not just brute-forcing broad permissions)?


Solution

  • Are there any logs for this where I can see exactly what is failing?

    To find Mac logs through:

    You can select the Go > Go to Folder menu item in Finder, and then copy and paste any of these paths into the dialog.

    Visual Studio for Mac

    • ~/Library/Logs/VisualStudio/7.0 (this number may change depending on the version you are using)
    • This folder can also be opened via "Help -> Open Log Directory".

    If you meet the Permission denied error in the log, this may be due to saving the IPA in the XCode.App folder. You can try a different location.

    If you still meet problem, you can send a feed back inside visual studio for more help.