Skip to content

Commit 1e7b38b

Browse files
authored
Merge pull request #27 from janusw/fix_ios_crash
Fix crash of sample app
2 parents a05041d + 86646c8 commit 1e7b38b

File tree

5 files changed

+13
-13
lines changed

5 files changed

+13
-13
lines changed

Source/OxyPlot.Maui.Skia/Platforms/MacCatalyst/MauiFontLoader.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ public Stream Load(string fontName)
1212
if (fontRegistrar == null)
1313
fontRegistrar = IPlatformApplication.Current.Services.GetRequiredService<IFontRegistrar>();
1414

15-
fontName = fontRegistrar.GetFont(fontName);
16-
if (File.Exists(fontName))
17-
{
15+
fontName = fontRegistrar.GetFont(fontName) ?? fontName;
16+
if (fontName == null)
17+
return null;
18+
else if (File.Exists(fontName))
1819
return File.OpenRead(fontName);
19-
}
2020

2121
try
2222
{

Source/OxyPlot.Maui.Skia/Platforms/iOS/MauiFontLoader.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ public Stream Load(string fontName)
1212
if (fontRegistrar == null)
1313
fontRegistrar = IPlatformApplication.Current.Services.GetRequiredService<IFontRegistrar>();
1414

15-
fontName = fontRegistrar.GetFont(fontName);
16-
if (File.Exists(fontName))
17-
{
15+
fontName = fontRegistrar.GetFont(fontName) ?? fontName;
16+
if (fontName == null)
17+
return null;
18+
else if (File.Exists(fontName))
1819
return File.OpenRead(fontName);
19-
}
2020

2121
try
2222
{

Source/OxyplotMauiSample/OxyplotMauiSample.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@
1313
<ImplicitUsings>enable</ImplicitUsings>
1414

1515
<!-- Display name -->
16-
<ApplicationTitle>OxyplotMauiSimple</ApplicationTitle>
16+
<ApplicationTitle>OxyplotMauiSample</ApplicationTitle>
1717

1818
<!-- App Identifier -->
19-
<ApplicationId>com.companyname.oxyplotmauisimple</ApplicationId>
19+
<ApplicationId>com.companyname.oxyplotmauisample</ApplicationId>
2020
<ApplicationIdGuid>2C1CD083-05E3-4080-840A-EC3B8334CCD7</ApplicationIdGuid>
2121

2222
<!-- Versions -->
@@ -62,7 +62,7 @@
6262

6363
<ItemGroup>
6464
<PackageReference Include="OxyPlot.ExampleLibrary" Version="2.2.0" />
65-
<PackageReference Include="Microsoft.Maui.Controls" Version="$(MauiVersion)" />
65+
<PackageReference Include="Microsoft.Maui.Controls" Version="10.0.40" />
6666
</ItemGroup>
6767

6868
<ItemGroup>

Source/OxyplotMauiSample/Platforms/Tizen/tizen-manifest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<manifest package="maui-application-id-placeholder" version="0.0.0" api-version="7" xmlns="http://tizen.org/ns/packages">
33
<profile name="common" />
4-
<ui-application appid="maui-application-id-placeholder" exec="OxyplotMauiSimple.dll" multiple="false" nodisplay="false" taskmanage="true" type="dotnet" launch_mode="single">
4+
<ui-application appid="maui-application-id-placeholder" exec="OxyplotMauiSample.dll" multiple="false" nodisplay="false" taskmanage="true" type="dotnet" launch_mode="single">
55
<label>maui-application-title-placeholder</label>
66
<icon>maui-appicon-placeholder</icon>
77
<metadata key="http://tizen.org/metadata/prefer_dotnet_aot" value="true" />

Source/OxyplotMauiSample/Platforms/Windows/app.manifest

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
3-
<assemblyIdentity version="1.0.0.0" name="OxyplotMauiSimple.WinUI.app"/>
3+
<assemblyIdentity version="1.0.0.0" name="OxyplotMauiSample.WinUI.app"/>
44

55
<application xmlns="urn:schemas-microsoft-com:asm.v3">
66
<windowsSettings>

0 commit comments

Comments
 (0)