c# – Bug IOS ‘SkiaSharp.SKTextBlob SkiaSharp.SKTextBlob.CreatePositioned


In my .net maui applications, when I compile or deploy to publish to IOS I receive this error:

'SkiaSharp.SKTextBlob SkiaSharp.SKTextBlob.CreatePositioned(System.String, SkiaSharp.SKFont, System.ReadOnlySpan`1<SkiaSharp.SKPoint>) '. 
at Svg.Skia.SkiaModelExtensions.Draw(CanvasCommand canvasCommand, SKCanvas skCanvas)
    at Svg.Skia.SkiaM etc...

I tried this :

<Target Name="VSMac_RemoveSystemMemory" BeforeTargets="ResolveAssemblyReferences">
  <ItemGroup>
    <_ReferenceToRemove Include="@(Reference)" Condition="'%(Reference.Identity)'=='System.Memory'" />
    <Reference Remove="@(_ReferenceToRemove)" />
    <Reference Include="System.Memory" />
  </ItemGroup>
</Target>

<Target Name="VS_RemoveSystemMemory" BeforeTargets="FindReferenceAssembliesForReferences">
  <ItemGroup>
    <_ReferencePathToRemove Include="@(ReferencePath)" Condition="'%(ReferencePath.NuGetPackageId)'=='System.Memory'" />
    <ReferencePath Remove="@(_ReferencePathToRemove)" />
  </ItemGroup>
</Target>

I use Skia in several places in the application, here is an example :

<?xml version="1.0" encoding="utf-8" ?>
<ContentPage 
             xmlns:skia="clr-namespace:SkiaSharp.Extended.UI.Controls;assembly=SkiaSharp.Extended.UI"
             Title="">

                    <StackLayout Grid.Row="4" HeightRequest="600" VerticalOptions="FillAndExpand" HorizontalOptions="FillAndExpand" Margin="0">
                        
                        <skia:SKLottieView x:Name="EmptyView"
                            Source="Empty.json"
                            RepeatCount="-1"
                            HeightRequest="250"
                            WidthRequest="250"
                            HorizontalOptions="Center" 
                            VerticalOptions="Center"
                            IsVisible="false">
                        </skia:SKLottieView>

Latest articles

spot_imgspot_img

Related articles

Leave a reply

Please enter your comment!
Please enter your name here

spot_imgspot_img