Reputation: 261
I have an Xamarin.Forms (5.0.0.2083) app for android and ios. I am using Visual Studio version 16.11.2 and a mac with the latest xcode. I can build and execute the application on both android and IOS via the simulators for each platform. I can also archive a production release for android. However every time I try to archive a production release for IOS I get the below error. I am not new to this. I have been improving and deploying to production this specific application for several years. However we added some features and upgraded the nuget packages and now I can't seem to build a production IOS release. I have tried everything I can think of to fix this. Deleting and recreating certificates and provisioning profiles. Different windows machines, and different macs. Different version of visual studio. Downgrading skiasharp, etc... All with the same result. I also get the same result from the latest version of Visual Studio for Mac when I try it directly.. Can someone give me some idea of how to troubleshoot this?
4> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/dsymutil -num-threads 4 -z -o bin/iPhone/Release/IVI.Central.Mobile.iOS.app.dSYM bin/iPhone/Release/IVI.Central.Mobile.iOS.app/IVI.Central.Mobile.iOS
4> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/strip -i -s obj/iPhone/Release/mtouch-symbols.list bin/iPhone/Release/IVI.Central.Mobile.iOS.app/IVI.Central.Mobile.iOS
4> /usr/bin/mdimport bin/iPhone/Release/IVI.Central.Mobile.iOS.app/../
4> Tool /usr/bin/codesign execution finished (exit code = 1).
4>
4>C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Xamarin\iOS\Xamarin.Shared.targets(1075,3): error : /usr/bin/codesign exited with code 1
4>C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Xamarin\iOS\Xamarin.Shared.targets(1075,3): error :
4>C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Xamarin\iOS\Xamarin.Shared.targets(1075,3): **error : Failed to codesign** 'bin/iPhone/Release/IVI.Central.Mobile.iOS.app//Frameworks/**libSkiaSharp.framework/libSkiaSharp**': /Users/paulaicher/Library/Caches/Xamarin/mtbs/builds/IVI.Central.Mobile.iOS/849a0f003a7017afb02a607086b4ad9a3834fdb506af57c8fbe9219b92682d08/bin/iPhone/Release/IVI.Central.Mobile.iOS.app/Frameworks/**libSkiaSharp.framework: replacing existing signature**
4>C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Xamarin\iOS\Xamarin.Shared.targets(1075,3): error : Warning: unable to build chain to self-signed root for signer "Apple Distribution: Industrial Ventilation, Inc (EQS49K4W53)"
4>C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Xamarin\iOS\Xamarin.Shared.targets(1075,3): error : /Users/paulaicher/Library/Caches/Xamarin/mtbs/builds/IVI.Central.Mobile.iOS/849a0f003a7017afb02a607086b4ad9a3834fdb506af57c8fbe9219b92682d08/bin/iPhone/Release/IVI.Central.Mobile.iOS.app/Frameworks/libSkiaSharp.framework: errSecInternalComponent
4>C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Xamarin\iOS\Xamarin.Shared.targets(1075,3): error :
4>C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Xamarin\iOS\Xamarin.Shared.targets(1075,3): error :
========== Rebuild All: 3 succeeded, 1 failed, 0 skipped ==========
Upvotes: 7
Views: 2882
Reputation: 261
After much digging I finally figured it out. The error was misleading me to believe that this had something to do with libSkiaSharp. (Mainly because that is what it was throwing the error on) After completely irradicating libSkiaSharp from my project, I found I still had the signing error. It just didn't have the additional error for skiasharp anymore.
So I finally tracked down that both my macincloud VM, and the bran new mac I just purchased; both had the Old "Apple Worldwide Developer Relations Certification Authority" certificate installed in the keychain. While not expired yet, they have started issuing new certificates using their new renewed Certification Authority. See Detail Here
In Apple's documentation, XCode version 11.4.1 and above is supposed to automatically install the new renewed certificate. Which apparently XCode 12.5.1 is not doing.
To Fix this issue:
Upvotes: 14