Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/Client/UniScan.Client.App.Platform.iOS/AppDelegate.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
using Avalonia;
using Avalonia.iOS;
using Foundation;

namespace UniScan.Client.App.Platform.iOS;

// The UIApplicationDelegate for the application. This class is responsible for launching the
// User Interface of the application, as well as listening (and optionally responding) to
// application events from iOS.
[Register("AppDelegate")]
#pragma warning disable CA1711 // Identifiers should not have incorrect suffix
public partial class AppDelegate : AvaloniaAppDelegate<App>
public partial class AppDelegate : AvaloniaAppDelegate<UniScanApp>
#pragma warning restore CA1711 // Identifiers should not have incorrect suffix
{
protected override AppBuilder CustomizeAppBuilder(AppBuilder builder)
Expand Down
8 changes: 8 additions & 0 deletions src/Client/UniScan.Client.App.Platform.iOS/Main.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
using System.Threading.Tasks;
using UIKit;
using UniScan.Platform;
using UniScan.Platform.Implementations.Native;
using UniScan.Platform.Implementations.Native.Filesystem;

namespace UniScan.Client.App.Platform.iOS;

public class Application
{
// This is the main entry point of the application.
static void Main(string[] args)
{
UniScanApp.InitializePlatform += () => Task.FromResult(new HostEnvironment(new iOSPaths(), new NativePlatformSerilogInitializer(UniScan.Core.Constants.ConsoleOutputTemplate, UniScan.Core.Constants.FileOutputTemplate), new NativeDirectoryManager(), new NativeFileManager()));

// if you want to use a different Application Delegate class from "AppDelegate"
// you can specify it here.
UIApplication.Main(args, null, typeof(AppDelegate));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\UniScan.Client.App\UniScan.Client.App.csproj" />
<ProjectReference Include="..\UniScan.Client\UniScan.Client.csproj"/>
<ProjectReference Include="..\..\Platform\UniScan.Platform.Implementations.Native\UniScan.Platform.Implementations.Native.csproj" />
<ProjectReference Include="..\..\Platform\UniScan.Platform\UniScan.Platform.csproj" />
<ProjectReference Include="..\UniScan.Client.App\UniScan.Client.App.csproj"/>
</ItemGroup>
</Project>
15 changes: 15 additions & 0 deletions src/Client/UniScan.Client.App.Platform.iOS/iOSPaths.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
using System;
using System.IO;
using UniScan.Client.Core;
using UniScan.Platform;

namespace UniScan.Client.App.Platform.iOS;

public class iOSPaths : IPlatformStandardPaths
{
public string DataPath => Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData);

public string ConfigPath => Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData);

public string CachePath => Path.Combine(DataPath, ".cache");
}