question

Se-5654 avatar image
0 Votes"
Se-5654 asked RobCaplan edited

Xamarin iOS app crashing immediately after launching

After updating XCode and Visual Studio 2019 to the latest versions, my Xamarin.Forms app shows the launch screen for about a tenth of a second, and then crashes when running on an iPhone (the simulator still works fine).

Looking at the device log, I am seeing this error when the crash happens:

 Tag: kernel(AppleMobileFileIntegrity)
 Message: Library Validation failed: Rejecting '/private/var/containers/Bundle/Application/.../MyAppiOS.app/libMyAppiOS.exe.dylib' (Team ID: none, platform: no) for process 'MyAppiOS(506)' (Team ID: ABC123XYZ, platform: no), reason: mapped file has no cdhash, completely unsigned? Code has to be at least ad-hoc signed

Visual Studio Enterprise 16.10.3
Xamarin.iOS SDK 14.20.0.24

Any help would be appreciated. I haven't added any new third party libraries before this error began.

dotnet-xamarin
· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

It seems that dylib needs to be signed. Do you use VS on Windows or on Mac? You can refer to https://docs.microsoft.com/en-us/answers/questions/468120/ios-app-crashes-immediately-after-debug-start.html?sort=oldest, maybe it's a similar issue.

0 Votes 0 ·

I use VS on Windows. And since I could not get the app to run successfully no matter what I tried (rebooting PC/Mac, cleaning solution, deleting bin/obj folders, etc.), my only option was to downgrade Visual Studio & Xcode (the problem was happening on XCode 12.5 & VS 16.10). The problem is not happening when using XCode 12.1 and VS 16.7, which I am currently using now. I am guessing the issue might be with XCode 12.5, based on other researching/Googling this problem.

0 Votes 0 ·

This may be a potential issue of updating. It's suggested to report the issue via Visual Studio's 'Report a Problem' menu and then follow them on the developer community site. Please see How to report a problem with Visual Studio - Visual Studio | Microsoft Docs. Thank you for your sharing again.


0 Votes 0 ·

0 Answers