Question: 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)?

Answer: 
> 
> Are there any logs for this where I can see exactly what is failing?
> 
> 
> 

To find [Mac logs](https://learn.microsoft.com/en-us/xamarin/cross-platform/troubleshooting/questions/version-logs#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](https://learn.microsoft.com/en-us/visualstudio/releasenotes/vs2019-mac-relnotes#feedback) inside visual studio for more help.
It's very likely due to permission issue while zipping the archive.

To check if it's your case:

* Open the log folder at `~/Library/Logs/VisualStudio/7.0` or in **Visual Studio for Mac** `Help` > `Open Log Directory`
* Find and open the last log file for publishing (like `Publishing.yyyy-mm-dd__hh-mm-ss.log`)

Scroll to the last rows of that file. If it contains something like this (see the block below) so it's your case

```
zip I/O error: Permission denied
zip error: Could not create output file (/Applications/Xcode.app/YourApp.ipa)
zip exited with code 15
ERROR:Failed to create IPA archive.
Finished

```

In this case, once you see **Output IPA file** popup, just choose other save location (*Desktop* for example)
[![Change save location to Desktop](https://i.stack.imgur.com/jzSBW.png)](https://i.stack.imgur.com/jzSBW.png)