I've been stuck all day trying to get a Xamarin.iOS mobile application to distribute after archive.
The archive process runs smoothly, then when we attempt to distribute via Ad Hoc, it fails with a message complaining about a missing file.
The error is as follows:
Could not create ipa file for distribution of the archive '[redacted]'
/usr/bin/codesign exited with code 1
/usr/bin/codesign exited with code 1
Failed to codesign '.../Mobile.iOS/obj/iPhone/Debug/archives/Mobile.iOS 3-30-21 11.41 AM.xcarchive/Products/Applications/Mobile.iOS.app//**/*.dylib': [redacted]/Library/Caches/Xamarin/mtbs/builds/Mobile.iOS/17a75d5999f2d5c58a10f98135732a71be8d334fae491e1585d4d1f1bbfa6140/C:/Users/.../Mobile.iOS/obj/iPhone/Debug/archives/Mobile.iOS 3-30-21 11.41 AM.xcarchive/Products/Applications/Mobile.iOS.app//**/*.dylib: No such file or directory
Failed to codesign '.../Mobile.iOS/obj/iPhone/Debug/archives/Mobile.iOS 3-30-21 11.41 AM.xcarchive/Products/Applications/Mobile.iOS.app//**/*.metallib': [redacted]/Library/Caches/Xamarin/mtbs/builds/Mobile.iOS/17a75d5999f2d5c58a10f98135732a71be8d334fae491e1585d4d1f1bbfa6140/C:/Users/.../Mobile.iOS/obj/iPhone/Debug/archives/Mobile.iOS 3-30-21 11.41 AM.xcarchive/Products/Applications/Mobile.iOS.app//**/*.metallib: No such file or directory
I have shortened some file paths (...) and redacted some identifying information of our client.
To resolve this we have attempted to:
- The usual clean & rebuild
- Deleting /bin & /obj
- Clearing provisioning profiles & redownloading
- Deleting all build data/caches and the "iOS folder" from %LOCALAPPDATA%\Xamarin
- Reinstalling visual studio
- Deleting & redownloading the project files (which work on other machines)
Any help/pointers would be appreciated