Skip to content

Commit

Permalink
Add iOS support (#178)
Browse files Browse the repository at this point in the history
  • Loading branch information
mfkl authored May 4, 2020
1 parent e262d5f commit cf9c7bd
Show file tree
Hide file tree
Showing 32 changed files with 761 additions and 19 deletions.
10 changes: 1 addition & 9 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,18 +97,10 @@ var text = TextCopy.Clipboard.GetText();
* Linux with .NET Core 2.0 and up
* Linux with Mono 5.20.1 and up
* Xamarin.Android 9.0 and up
* Xamarin.iOS 10.0 and up
* Universal Windows Platform version 10.0.16299 and up


### Not verified

The following may work but have not been verified:

* Xamarin.iOS

If anyone verifies this, please submit a [Pull Request](https://help.github.com/articles/about-pull-requests/) to the readme with the outcome.


### Not supported

* Xamarin.Mac Full, .NET Framework 4.7.2
Expand Down
10 changes: 1 addition & 9 deletions readme.source.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,18 +53,10 @@ snippet: GetText
* Linux with .NET Core 2.0 and up
* Linux with Mono 5.20.1 and up
* Xamarin.Android 9.0 and up
* Xamarin.iOS 10.0 and up
* Universal Windows Platform version 10.0.16299 and up


### Not verified

The following may work but have not been verified:

* Xamarin.iOS

If anyone verifies this, please submit a [Pull Request](https://help.github.com/articles/about-pull-requests/) to the readme with the outcome.


### Not supported

* Xamarin.Mac Full, .NET Framework 4.7.2
Expand Down
64 changes: 64 additions & 0 deletions src/TextCopy.sln
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,22 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AndroidApp", "AndroidApp\An
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Weavers", "Weavers\Weavers.csproj", "{7E80FA1F-BA79-4AE2-8E49-7334BE790815}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "iOSApp", "iOSApp\iOSApp.csproj", "{EAB4EF13-D4DE-4544-92B6-C1467683FA0B}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|ARM = Debug|ARM
Debug|ARM64 = Debug|ARM64
Debug|iPhone = Debug|iPhone
Debug|iPhoneSimulator = Debug|iPhoneSimulator
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
Release|ARM = Release|ARM
Release|ARM64 = Release|ARM64
Release|iPhone = Release|iPhone
Release|iPhoneSimulator = Release|iPhoneSimulator
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
Expand All @@ -45,6 +51,10 @@ Global
{92E64F4E-6A8E-43C2-9C8D-694E0327BEF0}.Debug|ARM.Build.0 = Debug|Any CPU
{92E64F4E-6A8E-43C2-9C8D-694E0327BEF0}.Debug|ARM64.ActiveCfg = Debug|Any CPU
{92E64F4E-6A8E-43C2-9C8D-694E0327BEF0}.Debug|ARM64.Build.0 = Debug|Any CPU
{92E64F4E-6A8E-43C2-9C8D-694E0327BEF0}.Debug|iPhone.ActiveCfg = Debug|Any CPU
{92E64F4E-6A8E-43C2-9C8D-694E0327BEF0}.Debug|iPhone.Build.0 = Debug|Any CPU
{92E64F4E-6A8E-43C2-9C8D-694E0327BEF0}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
{92E64F4E-6A8E-43C2-9C8D-694E0327BEF0}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
{92E64F4E-6A8E-43C2-9C8D-694E0327BEF0}.Debug|x64.ActiveCfg = Debug|Any CPU
{92E64F4E-6A8E-43C2-9C8D-694E0327BEF0}.Debug|x64.Build.0 = Debug|Any CPU
{92E64F4E-6A8E-43C2-9C8D-694E0327BEF0}.Debug|x86.ActiveCfg = Debug|Any CPU
Expand All @@ -55,6 +65,10 @@ Global
{92E64F4E-6A8E-43C2-9C8D-694E0327BEF0}.Release|ARM.Build.0 = Release|Any CPU
{92E64F4E-6A8E-43C2-9C8D-694E0327BEF0}.Release|ARM64.ActiveCfg = Release|Any CPU
{92E64F4E-6A8E-43C2-9C8D-694E0327BEF0}.Release|ARM64.Build.0 = Release|Any CPU
{92E64F4E-6A8E-43C2-9C8D-694E0327BEF0}.Release|iPhone.ActiveCfg = Release|Any CPU
{92E64F4E-6A8E-43C2-9C8D-694E0327BEF0}.Release|iPhone.Build.0 = Release|Any CPU
{92E64F4E-6A8E-43C2-9C8D-694E0327BEF0}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
{92E64F4E-6A8E-43C2-9C8D-694E0327BEF0}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
{92E64F4E-6A8E-43C2-9C8D-694E0327BEF0}.Release|x64.ActiveCfg = Release|Any CPU
{92E64F4E-6A8E-43C2-9C8D-694E0327BEF0}.Release|x64.Build.0 = Release|Any CPU
{92E64F4E-6A8E-43C2-9C8D-694E0327BEF0}.Release|x86.ActiveCfg = Release|Any CPU
Expand All @@ -65,6 +79,8 @@ Global
{87DB4CC0-4AC3-4AC1-97FD-7C55D3B921D9}.Debug|ARM.Build.0 = Debug|Any CPU
{87DB4CC0-4AC3-4AC1-97FD-7C55D3B921D9}.Debug|ARM64.ActiveCfg = Debug|Any CPU
{87DB4CC0-4AC3-4AC1-97FD-7C55D3B921D9}.Debug|ARM64.Build.0 = Debug|Any CPU
{87DB4CC0-4AC3-4AC1-97FD-7C55D3B921D9}.Debug|iPhone.ActiveCfg = Debug|Any CPU
{87DB4CC0-4AC3-4AC1-97FD-7C55D3B921D9}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
{87DB4CC0-4AC3-4AC1-97FD-7C55D3B921D9}.Debug|x64.ActiveCfg = Debug|Any CPU
{87DB4CC0-4AC3-4AC1-97FD-7C55D3B921D9}.Debug|x64.Build.0 = Debug|Any CPU
{87DB4CC0-4AC3-4AC1-97FD-7C55D3B921D9}.Debug|x86.ActiveCfg = Debug|Any CPU
Expand All @@ -75,6 +91,8 @@ Global
{87DB4CC0-4AC3-4AC1-97FD-7C55D3B921D9}.Release|ARM.Build.0 = Release|Any CPU
{87DB4CC0-4AC3-4AC1-97FD-7C55D3B921D9}.Release|ARM64.ActiveCfg = Release|Any CPU
{87DB4CC0-4AC3-4AC1-97FD-7C55D3B921D9}.Release|ARM64.Build.0 = Release|Any CPU
{87DB4CC0-4AC3-4AC1-97FD-7C55D3B921D9}.Release|iPhone.ActiveCfg = Release|Any CPU
{87DB4CC0-4AC3-4AC1-97FD-7C55D3B921D9}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
{87DB4CC0-4AC3-4AC1-97FD-7C55D3B921D9}.Release|x64.ActiveCfg = Release|Any CPU
{87DB4CC0-4AC3-4AC1-97FD-7C55D3B921D9}.Release|x64.Build.0 = Release|Any CPU
{87DB4CC0-4AC3-4AC1-97FD-7C55D3B921D9}.Release|x86.ActiveCfg = Release|Any CPU
Expand All @@ -85,6 +103,8 @@ Global
{01C65189-BBE7-40B6-8D11-57CEF7ECD5BC}.Debug|ARM.Build.0 = Debug|Any CPU
{01C65189-BBE7-40B6-8D11-57CEF7ECD5BC}.Debug|ARM64.ActiveCfg = Debug|Any CPU
{01C65189-BBE7-40B6-8D11-57CEF7ECD5BC}.Debug|ARM64.Build.0 = Debug|Any CPU
{01C65189-BBE7-40B6-8D11-57CEF7ECD5BC}.Debug|iPhone.ActiveCfg = Debug|Any CPU
{01C65189-BBE7-40B6-8D11-57CEF7ECD5BC}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
{01C65189-BBE7-40B6-8D11-57CEF7ECD5BC}.Debug|x64.ActiveCfg = Debug|Any CPU
{01C65189-BBE7-40B6-8D11-57CEF7ECD5BC}.Debug|x64.Build.0 = Debug|Any CPU
{01C65189-BBE7-40B6-8D11-57CEF7ECD5BC}.Debug|x86.ActiveCfg = Debug|Any CPU
Expand All @@ -95,6 +115,8 @@ Global
{01C65189-BBE7-40B6-8D11-57CEF7ECD5BC}.Release|ARM.Build.0 = Release|Any CPU
{01C65189-BBE7-40B6-8D11-57CEF7ECD5BC}.Release|ARM64.ActiveCfg = Release|Any CPU
{01C65189-BBE7-40B6-8D11-57CEF7ECD5BC}.Release|ARM64.Build.0 = Release|Any CPU
{01C65189-BBE7-40B6-8D11-57CEF7ECD5BC}.Release|iPhone.ActiveCfg = Release|Any CPU
{01C65189-BBE7-40B6-8D11-57CEF7ECD5BC}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
{01C65189-BBE7-40B6-8D11-57CEF7ECD5BC}.Release|x64.ActiveCfg = Release|Any CPU
{01C65189-BBE7-40B6-8D11-57CEF7ECD5BC}.Release|x64.Build.0 = Release|Any CPU
{01C65189-BBE7-40B6-8D11-57CEF7ECD5BC}.Release|x86.ActiveCfg = Release|Any CPU
Expand All @@ -108,6 +130,8 @@ Global
{2E246AC3-7005-4558-9088-B876DA5FF803}.Debug|ARM64.ActiveCfg = Debug|ARM64
{2E246AC3-7005-4558-9088-B876DA5FF803}.Debug|ARM64.Build.0 = Debug|ARM64
{2E246AC3-7005-4558-9088-B876DA5FF803}.Debug|ARM64.Deploy.0 = Debug|ARM64
{2E246AC3-7005-4558-9088-B876DA5FF803}.Debug|iPhone.ActiveCfg = Debug|x86
{2E246AC3-7005-4558-9088-B876DA5FF803}.Debug|iPhoneSimulator.ActiveCfg = Debug|x86
{2E246AC3-7005-4558-9088-B876DA5FF803}.Debug|x64.ActiveCfg = Debug|x64
{2E246AC3-7005-4558-9088-B876DA5FF803}.Debug|x64.Build.0 = Debug|x64
{2E246AC3-7005-4558-9088-B876DA5FF803}.Debug|x64.Deploy.0 = Debug|x64
Expand All @@ -121,6 +145,8 @@ Global
{2E246AC3-7005-4558-9088-B876DA5FF803}.Release|ARM64.ActiveCfg = Release|ARM64
{2E246AC3-7005-4558-9088-B876DA5FF803}.Release|ARM64.Build.0 = Release|ARM64
{2E246AC3-7005-4558-9088-B876DA5FF803}.Release|ARM64.Deploy.0 = Release|ARM64
{2E246AC3-7005-4558-9088-B876DA5FF803}.Release|iPhone.ActiveCfg = Release|x86
{2E246AC3-7005-4558-9088-B876DA5FF803}.Release|iPhoneSimulator.ActiveCfg = Release|x86
{2E246AC3-7005-4558-9088-B876DA5FF803}.Release|x64.ActiveCfg = Release|x64
{2E246AC3-7005-4558-9088-B876DA5FF803}.Release|x64.Build.0 = Release|x64
{2E246AC3-7005-4558-9088-B876DA5FF803}.Release|x64.Deploy.0 = Release|x64
Expand All @@ -136,6 +162,12 @@ Global
{2B499E73-CF11-4333-B9DC-691AF5B73D5C}.Debug|ARM64.ActiveCfg = Debug|Any CPU
{2B499E73-CF11-4333-B9DC-691AF5B73D5C}.Debug|ARM64.Build.0 = Debug|Any CPU
{2B499E73-CF11-4333-B9DC-691AF5B73D5C}.Debug|ARM64.Deploy.0 = Debug|Any CPU
{2B499E73-CF11-4333-B9DC-691AF5B73D5C}.Debug|iPhone.ActiveCfg = Debug|Any CPU
{2B499E73-CF11-4333-B9DC-691AF5B73D5C}.Debug|iPhone.Build.0 = Debug|Any CPU
{2B499E73-CF11-4333-B9DC-691AF5B73D5C}.Debug|iPhone.Deploy.0 = Debug|Any CPU
{2B499E73-CF11-4333-B9DC-691AF5B73D5C}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
{2B499E73-CF11-4333-B9DC-691AF5B73D5C}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
{2B499E73-CF11-4333-B9DC-691AF5B73D5C}.Debug|iPhoneSimulator.Deploy.0 = Debug|Any CPU
{2B499E73-CF11-4333-B9DC-691AF5B73D5C}.Debug|x64.ActiveCfg = Debug|Any CPU
{2B499E73-CF11-4333-B9DC-691AF5B73D5C}.Debug|x64.Build.0 = Debug|Any CPU
{2B499E73-CF11-4333-B9DC-691AF5B73D5C}.Debug|x64.Deploy.0 = Debug|Any CPU
Expand All @@ -149,6 +181,12 @@ Global
{2B499E73-CF11-4333-B9DC-691AF5B73D5C}.Release|ARM64.ActiveCfg = Debug|Any CPU
{2B499E73-CF11-4333-B9DC-691AF5B73D5C}.Release|ARM64.Build.0 = Debug|Any CPU
{2B499E73-CF11-4333-B9DC-691AF5B73D5C}.Release|ARM64.Deploy.0 = Debug|Any CPU
{2B499E73-CF11-4333-B9DC-691AF5B73D5C}.Release|iPhone.ActiveCfg = Debug|Any CPU
{2B499E73-CF11-4333-B9DC-691AF5B73D5C}.Release|iPhone.Build.0 = Debug|Any CPU
{2B499E73-CF11-4333-B9DC-691AF5B73D5C}.Release|iPhone.Deploy.0 = Debug|Any CPU
{2B499E73-CF11-4333-B9DC-691AF5B73D5C}.Release|iPhoneSimulator.ActiveCfg = Debug|Any CPU
{2B499E73-CF11-4333-B9DC-691AF5B73D5C}.Release|iPhoneSimulator.Build.0 = Debug|Any CPU
{2B499E73-CF11-4333-B9DC-691AF5B73D5C}.Release|iPhoneSimulator.Deploy.0 = Debug|Any CPU
{2B499E73-CF11-4333-B9DC-691AF5B73D5C}.Release|x64.ActiveCfg = Debug|Any CPU
{2B499E73-CF11-4333-B9DC-691AF5B73D5C}.Release|x64.Build.0 = Debug|Any CPU
{2B499E73-CF11-4333-B9DC-691AF5B73D5C}.Release|x64.Deploy.0 = Debug|Any CPU
Expand All @@ -161,6 +199,10 @@ Global
{7E80FA1F-BA79-4AE2-8E49-7334BE790815}.Debug|ARM.Build.0 = Debug|Any CPU
{7E80FA1F-BA79-4AE2-8E49-7334BE790815}.Debug|ARM64.ActiveCfg = Debug|Any CPU
{7E80FA1F-BA79-4AE2-8E49-7334BE790815}.Debug|ARM64.Build.0 = Debug|Any CPU
{7E80FA1F-BA79-4AE2-8E49-7334BE790815}.Debug|iPhone.ActiveCfg = Debug|Any CPU
{7E80FA1F-BA79-4AE2-8E49-7334BE790815}.Debug|iPhone.Build.0 = Debug|Any CPU
{7E80FA1F-BA79-4AE2-8E49-7334BE790815}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
{7E80FA1F-BA79-4AE2-8E49-7334BE790815}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
{7E80FA1F-BA79-4AE2-8E49-7334BE790815}.Debug|x64.ActiveCfg = Debug|Any CPU
{7E80FA1F-BA79-4AE2-8E49-7334BE790815}.Debug|x64.Build.0 = Debug|Any CPU
{7E80FA1F-BA79-4AE2-8E49-7334BE790815}.Debug|x86.ActiveCfg = Debug|Any CPU
Expand All @@ -171,10 +213,32 @@ Global
{7E80FA1F-BA79-4AE2-8E49-7334BE790815}.Release|ARM.Build.0 = Release|Any CPU
{7E80FA1F-BA79-4AE2-8E49-7334BE790815}.Release|ARM64.ActiveCfg = Release|Any CPU
{7E80FA1F-BA79-4AE2-8E49-7334BE790815}.Release|ARM64.Build.0 = Release|Any CPU
{7E80FA1F-BA79-4AE2-8E49-7334BE790815}.Release|iPhone.ActiveCfg = Release|Any CPU
{7E80FA1F-BA79-4AE2-8E49-7334BE790815}.Release|iPhone.Build.0 = Release|Any CPU
{7E80FA1F-BA79-4AE2-8E49-7334BE790815}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
{7E80FA1F-BA79-4AE2-8E49-7334BE790815}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
{7E80FA1F-BA79-4AE2-8E49-7334BE790815}.Release|x64.ActiveCfg = Release|Any CPU
{7E80FA1F-BA79-4AE2-8E49-7334BE790815}.Release|x64.Build.0 = Release|Any CPU
{7E80FA1F-BA79-4AE2-8E49-7334BE790815}.Release|x86.ActiveCfg = Release|Any CPU
{7E80FA1F-BA79-4AE2-8E49-7334BE790815}.Release|x86.Build.0 = Release|Any CPU
{EAB4EF13-D4DE-4544-92B6-C1467683FA0B}.Debug|Any CPU.ActiveCfg = Debug|iPhone
{EAB4EF13-D4DE-4544-92B6-C1467683FA0B}.Debug|ARM.ActiveCfg = Debug|iPhone
{EAB4EF13-D4DE-4544-92B6-C1467683FA0B}.Debug|ARM64.ActiveCfg = Debug|iPhone
{EAB4EF13-D4DE-4544-92B6-C1467683FA0B}.Debug|iPhone.ActiveCfg = Debug|iPhone
{EAB4EF13-D4DE-4544-92B6-C1467683FA0B}.Debug|iPhone.Build.0 = Debug|iPhone
{EAB4EF13-D4DE-4544-92B6-C1467683FA0B}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator
{EAB4EF13-D4DE-4544-92B6-C1467683FA0B}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator
{EAB4EF13-D4DE-4544-92B6-C1467683FA0B}.Debug|x64.ActiveCfg = Debug|iPhone
{EAB4EF13-D4DE-4544-92B6-C1467683FA0B}.Debug|x86.ActiveCfg = Debug|iPhone
{EAB4EF13-D4DE-4544-92B6-C1467683FA0B}.Release|Any CPU.ActiveCfg = Release|iPhone
{EAB4EF13-D4DE-4544-92B6-C1467683FA0B}.Release|ARM.ActiveCfg = Release|iPhone
{EAB4EF13-D4DE-4544-92B6-C1467683FA0B}.Release|ARM64.ActiveCfg = Release|iPhone
{EAB4EF13-D4DE-4544-92B6-C1467683FA0B}.Release|iPhone.ActiveCfg = Release|iPhone
{EAB4EF13-D4DE-4544-92B6-C1467683FA0B}.Release|iPhone.Build.0 = Release|iPhone
{EAB4EF13-D4DE-4544-92B6-C1467683FA0B}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator
{EAB4EF13-D4DE-4544-92B6-C1467683FA0B}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator
{EAB4EF13-D4DE-4544-92B6-C1467683FA0B}.Release|x64.ActiveCfg = Release|iPhone
{EAB4EF13-D4DE-4544-92B6-C1467683FA0B}.Release|x86.ActiveCfg = Release|iPhone
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
27 changes: 27 additions & 0 deletions src/TextCopy/Clipboard_GetiOS.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#if IOS
using System;
using System.Threading.Tasks;
using System.Threading;
using UIKit;

namespace TextCopy
{
public static partial class Clipboard
{
static Func<CancellationToken, Task<string?>> CreateAsyncGet()
{
return token => Task.FromResult(GetTextiOS());
}

static Func<string?> CreateGet()
{
return GetTextiOS;
}

static string? GetTextiOS()
{
return UIPasteboard.General.String;
}
}
}
#endif
31 changes: 31 additions & 0 deletions src/TextCopy/Clipboard_SetiOS.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#if IOS
using System;
using System.Threading;
using System.Threading.Tasks;
using UIKit;

namespace TextCopy
{
public static partial class Clipboard
{
static Func<string, CancellationToken, Task> CreateAsyncSet()
{
return (text, cancellation) =>
{
SetTextiOS(text);
return Task.CompletedTask;
};
}

static Action<string> CreateSet()
{
return SetTextiOS;
}

static void SetTextiOS(string text)
{
UIPasteboard.General.String = text;
}
}
}
#endif
5 changes: 4 additions & 1 deletion src/TextCopy/TextCopy.csproj
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
<Project Sdk="MSBuild.Sdk.Extras">
<PropertyGroup>
<TargetFrameworks>net461;netstandard2.0;netstandard2.1;uap10.0;monoandroid9.0</TargetFrameworks>
<TargetFrameworks>net461;netstandard2.0;netstandard2.1;uap10.0;monoandroid9.0;xamarin.ios10</TargetFrameworks>
</PropertyGroup>
<PropertyGroup Condition="'$(TargetFramework)' == 'uap10.0'">
<DefineConstants>$(DefineConstants);UAP</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="$(TargetFramework.StartsWith('monoandroid'))">
<DefineConstants>$(DefineConstants);ANDROID</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="$(TargetFramework.StartsWith('xamarin.ios'))">
<DefineConstants>$(DefineConstants);IOS</DefineConstants>
</PropertyGroup>
<ItemGroup>
<WeaverFiles Include="$(SolutionDir)Weavers\bin\$(Configuration)\netstandard2.0\Weavers.dll" />
<PackageReference Include="Fody" Version="6.1.1" PrivateAssets="All" />
Expand Down
41 changes: 41 additions & 0 deletions src/iOSApp/AppDelegate.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
using Foundation;
using UIKit;

namespace iOSApp
{
// 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")]
public class AppDelegate : UIResponder, IUIApplicationDelegate {

[Export("window")]
public UIWindow Window { get; set; }

[Export ("application:didFinishLaunchingWithOptions:")]
public bool FinishedLaunching (UIApplication application, NSDictionary launchOptions)
{
// Override point for customization after application launch.
// If not required for your application you can safely delete this method
return true;
}

// UISceneSession Lifecycle

[Export ("application:configurationForConnectingSceneSession:options:")]
public UISceneConfiguration GetConfiguration (UIApplication application, UISceneSession connectingSceneSession, UISceneConnectionOptions options)
{
// Called when a new scene session is being created.
// Use this method to select a configuration to create the new scene with.
return UISceneConfiguration.Create ("Default Configuration", connectingSceneSession.Role);
}

[Export ("application:didDiscardSceneSessions:")]
public void DidDiscardSceneSessions (UIApplication application, NSSet<UISceneSession> sceneSessions)
{
// Called when the user discards a scene session.
// If any sessions were discarded while the application was not running, this will be called shortly after `FinishedLaunching`.
// Use this method to release any resources that were specific to the discarded scenes, as they will not return.
}
}
}

Loading

0 comments on commit cf9c7bd

Please sign in to comment.