Life as a developer

Obscure issues for Xamarin iOS

I offer you a collection of fixes for some of the more obscure issues that I’ve encountered during my experience with Xamarin.iOS. This is the result of hours of head scratching and searching for solutions on Stack Overflow and Xamarin Forums.

Failed to compile the generated registrar code.

This can happen if you are targeting an older SDK and use code that require a newer version. Open up properties for your iOS project, go to iOS Build and set SDK version to Default. This will select the latest SDK.

extra linker definition file could not be located

If you have added a linker xml file to point to assemblies that needs to be linked, you need to make sure that this file’s Copy to Output Directory property is set to Copy if newer to make sure it is copied over.

An error occured on client Build420680 while executing a reply for topic

I think there can be several reasons for this bug, but for me it was that I have moved away from xcassets as icons, but the reference was still in my .csproj file. Search for xcassets and remove the entire itemgroup.

Failed to read file attributes for “/Users/**/Library/Caches/Xamarin/Resources/Images.xcassets”

Similar as the last issue. For this I had to delete the image.xcassets from the folder, and even had to delete "/Library/Caches/Xamarin/mtbs/builds/[App_Name]" folder on my Mac.

Native linking error, not found or no such file ….

Add namespace to your linker xml file. Remember to add extra argument to mtouch argument: --xml=${ProjectDir}/linker.xml

    <assembly fullname="{your namespace}">
        <type fullname="{your namespace}.*" />

For a more detailed look: MTouch errors.

view missing default constructor.

I got this mysterious bug after adding a storyboard, but deselecting "use size classes" did the trick for me.

Could not AOT the assembly ‘/Users/**/Library/Caches/Xamarin/mtbs/builds/**/…

This was a bug in one of the Xamarin builds, after an update to the latest build it went away.

Could not load Info.plist: Could not find file “/Users/**/Library/Caches/Xamarin/mtbs/builds/**

Check the properties for the info.plist. Build action should have been set to None and Copy as newer.

error MT1206: Could not find the simulator runtime ‘“*’

This means that you are missing the simulator for the version that you are running against. Open up XCode -> Preferences -> Components and download the simulator that you need.

General issues

If all else fails I try these steps:


Arnstein Johansen is a .NET Developer with a speciality in web development, but he also dabbles in mobile development and everything new and exciting. Arnstein works for Itema AS, a mid-size consultant agency in Trondheim. Itema has 25 consultants and recently won the prize for Norway's best workplace. He likes to share his knowledge by holding talks for others, either it is clients, colleagues or likeminded developers in user groups. He has hands-on experience from large projects, the latest from Urørt where he leads a team of developers creating a music service used by around 100000 users.

One Comment

  1. Anyone at Xamarin know of any plans to provide a way to animate the Icon of the MasterDetailPage? Yes its just eye candy, but visual feedback for an action improves the user experience.

Leave a reply