We're in the process of replacing a legacy app with a Maui app. We're using the the latest version of ArcGISRuntime.Maui (100.14.1-preview3 at the time of post) , with some success, when it's deployed to a device. However, when attempting to use the emulator, we're getting the following error.
Esri.ArcGISRuntime.ArcGISRuntimeException: 'Internal error: Could not create rendering pipeline 're_texture_draw'.
API message: Target OS is incompatible: library was not compiled for the simulator
Note, this exception is also thrown when debugging the sample at https://github.com/dotMorten/MauiPlayground.
I looked for a similar question but didn't turn up anything. Is this a known bug, is there a work around for it, or a timeline for a fix?
Solved! Go to Solution.
This is a known issue with the ios simulator in that preview, and will be fixed in the next preview. Until then, add this to your project file, and it should address it.
<ItemGroup Condition="'$(RuntimeIdentifier)' == 'iossimulator-x64'">
<PackageReference Include="Esri.ArcGISRuntime.Xamarin.iOS" Version="100.14.1" GeneratePathProperty="true" />
<Content Include="$(PkgEsri_ArcGISRuntime_Xamarin_iOS)\resources\shaders\simx64\*.metallib" Visible="false" Condition="'$(RuntimeIdentifier)' == 'iossimulator-x64'" >
<Link>RuntimeCoreNet\resources\shaders\%(RecursiveDir)%(Filename)%(Extension)</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
Thanks for trying ArcGIS Runtime SDK Maui preview. It is exciting to see our users transitioning to new technology . For this particular error, are you getting this error when deploying to an iOS simulator?
Correct. The crash happens regardless of whether or not I debug it, or simply deploy it, as long as the simulator is used.
This is a known issue with the ios simulator in that preview, and will be fixed in the next preview. Until then, add this to your project file, and it should address it.
<ItemGroup Condition="'$(RuntimeIdentifier)' == 'iossimulator-x64'">
<PackageReference Include="Esri.ArcGISRuntime.Xamarin.iOS" Version="100.14.1" GeneratePathProperty="true" />
<Content Include="$(PkgEsri_ArcGISRuntime_Xamarin_iOS)\resources\shaders\simx64\*.metallib" Visible="false" Condition="'$(RuntimeIdentifier)' == 'iossimulator-x64'" >
<Link>RuntimeCoreNet\resources\shaders\%(RecursiveDir)%(Filename)%(Extension)</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
Thanks for the work around, it's working correctly with that addition.
Anyone else encountering this error, add the item group then clean your solution.