I'm trying to publish an iOS app (AdHoc) with Visual Studio 2022 (win 64bit, v17.5.1)). My solution is in maui, .net 7 and targets Android and iOS. I use a Mac mini as a buildserver with all updates installed, xcode is at 14.2. I use an iPod Touch 7th gen, that is also up to date, as a remote device.
But whatever I do, my archive manager is always empty. After I click publish the archive manager opens and it says "archiving" with a green progress bar. After some time the text changes to "App archive 'My App' completed successfully, but the progress bar keeps on going. If I then close and reopen the archive manager, I can't see the archive at all.
At AppData\Local\Xamarin\iOS\Archives I can see that the archive indeed was build, so the error is only that visual studio doesnt show the archive.
I never changed the archives location in the Xamarin --> iOS Settings. It is at C:\Users\MyUser\AppData\Local\Xamarin\iOS\Archives
What might be a problem: I also use VS2019 and have archived and published another app, which is still in Xamarin. Maybe this is why VS2022 gets confused...
What I already did for trouble shooting:
- Checked that the Entitlements.plist exists and is correct
- Checked that the correct certificate and provisioning profile is chosen at project settings at bundle signing
- Checked that the .csproj file is correct and refers to the correct signing certificate and provisioning profile
- Checked that the app identifier is the same at every place you can set it.
- Checked that the Info.plist is correct and includes CFBundleShortVersionString and CFBundleVersion
- Deleted bin and obj folders for the solution
- Deleted everything inside AppData\Local\Xamarin folder
- Restart PC and Mac
- Open VS2022 on windows pc, connect to mac.
- Add my Apple Developer account at tools --> options --> Xamarin --> Apple accounts. Then add the distribution certificate. It is shown as valid. Then download the provisioning profiles
- Clean solution
- Build
- Publish
- After some time, it says "archive completed successfully, but the progress bar doesn't stop
- After closing and reopening the archive manager, it says "no archive builds available"
- But the archive is at AppData\Local\Xamarin\iOS\Archives\2023-03-14\My-App 3-14-23 11.26 AM.xcarchive, with a dSYMs and a Products folder and the correct Info.plist
The whole folder is 163MB
Update: archiving for Android yields the same result. The archive is build and I can find it via the explorer, but the archive manager is stil empty.