From ee2762620fa093a19373ce256f46db64d543502d Mon Sep 17 00:00:00 2001 From: Christoph Fink Date: Sun, 9 Jan 2022 10:59:28 +0100 Subject: [PATCH 1/7] add MAUI support --- Calendars.nuspec | 26 +++++-- Calendars.sln | 74 ++++++++++++++++++- .../CalendarEventReminder.cs | 4 +- .../CalendarsImplementation.cs | 17 +++-- .../Calendars.Plugin.MAUI.csproj | 63 ++++++++++++++++ .../CalendarsImplementation.cs | 6 +- Calendars/Calendars.Plugin/CrossCalendars.cs | 4 +- 7 files changed, 171 insertions(+), 23 deletions(-) create mode 100644 Calendars/Calendars.Plugin.MAUI/Calendars.Plugin.MAUI.csproj diff --git a/Calendars.nuspec b/Calendars.nuspec index ebdcdd5..3036e0c 100644 --- a/Calendars.nuspec +++ b/Calendars.nuspec @@ -2,7 +2,7 @@ CClarke.Plugin.Calendars - 1.1.0 + 1.2.0 Calendars API Plugin for Xamarin and Windows Caleb Clarke Caleb Clarke @@ -10,18 +10,22 @@ https://github.com/TheAlmightyBob/Calendars plugin_icon_nuget.png - + false - Perform basic CRUD calendar operations on iOS/Android/UWP through a simple common API. - + Perform basic CRUD calendar operations on iOS/Android/UWP/MAUI through a simple common API. + See project site README for usage notes and limitations. +1.2.0 changes: + +Add .NET MAUI support. + 1.1.0 changes: Support for C#8 nullable reference types. - + 1.0.14 changes: Setting Reminders to null in AddOrUpdateEventAsyc now preserves existing/default reminders. @@ -69,5 +73,17 @@ Setting Reminders to null in AddOrUpdateEventAsyc now preserves existing/default + + + + + + + + + + + + diff --git a/Calendars.sln b/Calendars.sln index 4ad3855..5968e23 100644 --- a/Calendars.sln +++ b/Calendars.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 15 -VisualStudioVersion = 15.0.27130.2020 +# Visual Studio Version 17 +VisualStudioVersion = 17.1.32104.313 MinimumVisualStudioVersion = 10.0.40219.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Calendars.Plugin.iOSUnified", "Calendars\Calendars.Plugin.iOSUnified\Calendars.Plugin.iOSUnified.csproj", "{2882AEEB-D4CD-4EB9-8A6C-6653B33681F0}" EndProject @@ -26,9 +26,11 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Calendars.Plugin.UWP", "Cal EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Calendars.Plugin.UWP.Tests", "Tests\Calendars.Plugin.UWP.Tests\Calendars.Plugin.UWP.Tests.csproj", "{449591A6-F24A-437D-857A-212BEF68E4D2}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Calendars.Plugin.Abstractions", "Calendars\Calendars.Plugin.Abstractions\Calendars.Plugin.Abstractions.csproj", "{AE8E6FFF-DA18-4ECB-B0B0-ABC527B5DE32}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Calendars.Plugin.Abstractions", "Calendars\Calendars.Plugin.Abstractions\Calendars.Plugin.Abstractions.csproj", "{AE8E6FFF-DA18-4ECB-B0B0-ABC527B5DE32}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Calendars.Plugin", "Calendars\Calendars.Plugin\Calendars.Plugin.csproj", "{D62199DA-C277-4422-8344-F80886CE3861}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Calendars.Plugin", "Calendars\Calendars.Plugin\Calendars.Plugin.csproj", "{D62199DA-C277-4422-8344-F80886CE3861}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Calendars.Plugin.MAUI", "Calendars\Calendars.Plugin.MAUI\Calendars.Plugin.MAUI.csproj", "{DE458357-74A5-4BA9-AAFB-828470CECBFF}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -564,6 +566,70 @@ Global {D62199DA-C277-4422-8344-F80886CE3861}.Release|x64.Build.0 = Release|Any CPU {D62199DA-C277-4422-8344-F80886CE3861}.Release|x86.ActiveCfg = Release|Any CPU {D62199DA-C277-4422-8344-F80886CE3861}.Release|x86.Build.0 = Release|Any CPU + {DE458357-74A5-4BA9-AAFB-828470CECBFF}.Ad-Hoc|Android.ActiveCfg = Debug|Any CPU + {DE458357-74A5-4BA9-AAFB-828470CECBFF}.Ad-Hoc|Android.Build.0 = Debug|Any CPU + {DE458357-74A5-4BA9-AAFB-828470CECBFF}.Ad-Hoc|Any CPU.ActiveCfg = Debug|Any CPU + {DE458357-74A5-4BA9-AAFB-828470CECBFF}.Ad-Hoc|Any CPU.Build.0 = Debug|Any CPU + {DE458357-74A5-4BA9-AAFB-828470CECBFF}.Ad-Hoc|ARM.ActiveCfg = Debug|Any CPU + {DE458357-74A5-4BA9-AAFB-828470CECBFF}.Ad-Hoc|ARM.Build.0 = Debug|Any CPU + {DE458357-74A5-4BA9-AAFB-828470CECBFF}.Ad-Hoc|iPhone.ActiveCfg = Debug|Any CPU + {DE458357-74A5-4BA9-AAFB-828470CECBFF}.Ad-Hoc|iPhone.Build.0 = Debug|Any CPU + {DE458357-74A5-4BA9-AAFB-828470CECBFF}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {DE458357-74A5-4BA9-AAFB-828470CECBFF}.Ad-Hoc|iPhoneSimulator.Build.0 = Debug|Any CPU + {DE458357-74A5-4BA9-AAFB-828470CECBFF}.Ad-Hoc|Mixed Platforms.ActiveCfg = Debug|Any CPU + {DE458357-74A5-4BA9-AAFB-828470CECBFF}.Ad-Hoc|Mixed Platforms.Build.0 = Debug|Any CPU + {DE458357-74A5-4BA9-AAFB-828470CECBFF}.Ad-Hoc|x64.ActiveCfg = Debug|Any CPU + {DE458357-74A5-4BA9-AAFB-828470CECBFF}.Ad-Hoc|x64.Build.0 = Debug|Any CPU + {DE458357-74A5-4BA9-AAFB-828470CECBFF}.Ad-Hoc|x86.ActiveCfg = Debug|Any CPU + {DE458357-74A5-4BA9-AAFB-828470CECBFF}.Ad-Hoc|x86.Build.0 = Debug|Any CPU + {DE458357-74A5-4BA9-AAFB-828470CECBFF}.AppStore|Android.ActiveCfg = Debug|Any CPU + {DE458357-74A5-4BA9-AAFB-828470CECBFF}.AppStore|Android.Build.0 = Debug|Any CPU + {DE458357-74A5-4BA9-AAFB-828470CECBFF}.AppStore|Any CPU.ActiveCfg = Debug|Any CPU + {DE458357-74A5-4BA9-AAFB-828470CECBFF}.AppStore|Any CPU.Build.0 = Debug|Any CPU + {DE458357-74A5-4BA9-AAFB-828470CECBFF}.AppStore|ARM.ActiveCfg = Debug|Any CPU + {DE458357-74A5-4BA9-AAFB-828470CECBFF}.AppStore|ARM.Build.0 = Debug|Any CPU + {DE458357-74A5-4BA9-AAFB-828470CECBFF}.AppStore|iPhone.ActiveCfg = Debug|Any CPU + {DE458357-74A5-4BA9-AAFB-828470CECBFF}.AppStore|iPhone.Build.0 = Debug|Any CPU + {DE458357-74A5-4BA9-AAFB-828470CECBFF}.AppStore|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {DE458357-74A5-4BA9-AAFB-828470CECBFF}.AppStore|iPhoneSimulator.Build.0 = Debug|Any CPU + {DE458357-74A5-4BA9-AAFB-828470CECBFF}.AppStore|Mixed Platforms.ActiveCfg = Debug|Any CPU + {DE458357-74A5-4BA9-AAFB-828470CECBFF}.AppStore|Mixed Platforms.Build.0 = Debug|Any CPU + {DE458357-74A5-4BA9-AAFB-828470CECBFF}.AppStore|x64.ActiveCfg = Debug|Any CPU + {DE458357-74A5-4BA9-AAFB-828470CECBFF}.AppStore|x64.Build.0 = Debug|Any CPU + {DE458357-74A5-4BA9-AAFB-828470CECBFF}.AppStore|x86.ActiveCfg = Debug|Any CPU + {DE458357-74A5-4BA9-AAFB-828470CECBFF}.AppStore|x86.Build.0 = Debug|Any CPU + {DE458357-74A5-4BA9-AAFB-828470CECBFF}.Debug|Android.ActiveCfg = Debug|Any CPU + {DE458357-74A5-4BA9-AAFB-828470CECBFF}.Debug|Android.Build.0 = Debug|Any CPU + {DE458357-74A5-4BA9-AAFB-828470CECBFF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DE458357-74A5-4BA9-AAFB-828470CECBFF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DE458357-74A5-4BA9-AAFB-828470CECBFF}.Debug|ARM.ActiveCfg = Debug|Any CPU + {DE458357-74A5-4BA9-AAFB-828470CECBFF}.Debug|ARM.Build.0 = Debug|Any CPU + {DE458357-74A5-4BA9-AAFB-828470CECBFF}.Debug|iPhone.ActiveCfg = Debug|Any CPU + {DE458357-74A5-4BA9-AAFB-828470CECBFF}.Debug|iPhone.Build.0 = Debug|Any CPU + {DE458357-74A5-4BA9-AAFB-828470CECBFF}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {DE458357-74A5-4BA9-AAFB-828470CECBFF}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU + {DE458357-74A5-4BA9-AAFB-828470CECBFF}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {DE458357-74A5-4BA9-AAFB-828470CECBFF}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {DE458357-74A5-4BA9-AAFB-828470CECBFF}.Debug|x64.ActiveCfg = Debug|Any CPU + {DE458357-74A5-4BA9-AAFB-828470CECBFF}.Debug|x64.Build.0 = Debug|Any CPU + {DE458357-74A5-4BA9-AAFB-828470CECBFF}.Debug|x86.ActiveCfg = Debug|Any CPU + {DE458357-74A5-4BA9-AAFB-828470CECBFF}.Debug|x86.Build.0 = Debug|Any CPU + {DE458357-74A5-4BA9-AAFB-828470CECBFF}.Release|Android.ActiveCfg = Release|Any CPU + {DE458357-74A5-4BA9-AAFB-828470CECBFF}.Release|Android.Build.0 = Release|Any CPU + {DE458357-74A5-4BA9-AAFB-828470CECBFF}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DE458357-74A5-4BA9-AAFB-828470CECBFF}.Release|Any CPU.Build.0 = Release|Any CPU + {DE458357-74A5-4BA9-AAFB-828470CECBFF}.Release|ARM.ActiveCfg = Release|Any CPU + {DE458357-74A5-4BA9-AAFB-828470CECBFF}.Release|ARM.Build.0 = Release|Any CPU + {DE458357-74A5-4BA9-AAFB-828470CECBFF}.Release|iPhone.ActiveCfg = Release|Any CPU + {DE458357-74A5-4BA9-AAFB-828470CECBFF}.Release|iPhone.Build.0 = Release|Any CPU + {DE458357-74A5-4BA9-AAFB-828470CECBFF}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU + {DE458357-74A5-4BA9-AAFB-828470CECBFF}.Release|iPhoneSimulator.Build.0 = Release|Any CPU + {DE458357-74A5-4BA9-AAFB-828470CECBFF}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {DE458357-74A5-4BA9-AAFB-828470CECBFF}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {DE458357-74A5-4BA9-AAFB-828470CECBFF}.Release|x64.ActiveCfg = Release|Any CPU + {DE458357-74A5-4BA9-AAFB-828470CECBFF}.Release|x64.Build.0 = Release|Any CPU + {DE458357-74A5-4BA9-AAFB-828470CECBFF}.Release|x86.ActiveCfg = Release|Any CPU + {DE458357-74A5-4BA9-AAFB-828470CECBFF}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/Calendars/Calendars.Plugin.Abstractions/CalendarEventReminder.cs b/Calendars/Calendars.Plugin.Abstractions/CalendarEventReminder.cs index 07090fb..7099106 100644 --- a/Calendars/Calendars.Plugin.Abstractions/CalendarEventReminder.cs +++ b/Calendars/Calendars.Plugin.Abstractions/CalendarEventReminder.cs @@ -1,4 +1,4 @@ -using System; +using System; namespace Plugin.Calendars.Abstractions { @@ -18,7 +18,7 @@ public class CalendarEventReminder /// public CalendarReminderMethod Method { get; set; } = CalendarReminderMethod.Default; - public override bool Equals(object obj) + public override bool Equals(object? obj) { if (ReferenceEquals(this, obj)) { diff --git a/Calendars/Calendars.Plugin.Android/CalendarsImplementation.cs b/Calendars/Calendars.Plugin.Android/CalendarsImplementation.cs index fab24f0..5aae67a 100644 --- a/Calendars/Calendars.Plugin.Android/CalendarsImplementation.cs +++ b/Calendars/Calendars.Plugin.Android/CalendarsImplementation.cs @@ -9,6 +9,7 @@ using System.Linq; using System.Threading.Tasks; using Calendar = Plugin.Calendars.Abstractions.Calendar; +using Application = Android.App.Application; #nullable enable @@ -34,9 +35,9 @@ public class CalendarsImplementation : ICalendars CalendarContract.Calendars.InterfaceConsts.CalendarAccessLevel, CalendarContract.Calendars.InterfaceConsts.AccountType }; - + #endregion - + #region Properties /// @@ -113,7 +114,7 @@ public Task> GetCalendarsAsync() => Task.Run(() => _calendarsProjection); var calendar = SingleItemFromCursor(cursor, () => GetCalendar(cursor)); - + return calendar; }); } @@ -157,7 +158,7 @@ public async Task> GetEventsAsync(Calendar calendar, DateTi ContentUris.AppendId(eventsUriBuilder, DateConversions.GetDateAsAndroidMS(end)); var eventsUri = eventsUriBuilder?.Build(); - return await Task.Run(() => + return await Task.Run(() => { var cursor = Query(eventsUri, eventsProjection, string.Format("{0} = {1}", CalendarContract.Events.InterfaceConsts.CalendarId, calendar.ExternalID), @@ -416,14 +417,14 @@ public async Task AddEventReminderAsync(CalendarEvent calendarEvent, CalendarEve throw new ArgumentException("Missing calendar event identifier", nameof(calendarEvent)); } - // Verify calendar event exists + // Verify calendar event exists var existingAppt = await GetEventByIdAsync(calendarEvent.ExternalID).ConfigureAwait(false); if (existingAppt == null) { throw new ArgumentException("Specified calendar event not found on device"); } - + await Task.Run(() => { if (IsEventRecurring(calendarEvent.ExternalID)) @@ -456,7 +457,7 @@ public async Task DeleteCalendarAsync(Calendar calendar) throw new ArgumentException("Cannot delete calendar (probably because it's non-local)", nameof(calendar)); } - return await Task.Run(() => Delete(_calendarsUri, long.Parse(calendar.ExternalID))).ConfigureAwait(false); + return await Task.Run(() => Delete(_calendarsUri, long.Parse(calendar.ExternalID ?? String.Empty))).ConfigureAwait(false); } /// @@ -742,7 +743,7 @@ private static Calendar GetCalendar(ICursor cursor) AccountName = cursor.GetString(CalendarContract.Calendars.InterfaceConsts.AccountName) }; } - + private static ICursor Query(Android.Net.Uri? uri, string[] projection, string? selection = null, string[]? selectionArgs = null, string? sortOrder = null) { diff --git a/Calendars/Calendars.Plugin.MAUI/Calendars.Plugin.MAUI.csproj b/Calendars/Calendars.Plugin.MAUI/Calendars.Plugin.MAUI.csproj new file mode 100644 index 0000000..5b0bf0f --- /dev/null +++ b/Calendars/Calendars.Plugin.MAUI/Calendars.Plugin.MAUI.csproj @@ -0,0 +1,63 @@ + + + + net6.0;net6.0-android;net6.0-ios;net6.0-maccatalyst + $(TargetFrameworks);net6.0-windows10.0.19041 + true + true + enable + False + True + + 14.2 + 14.0 + 21.0 + 10.0.17763.0 + 10.0.17763.0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Calendars/Calendars.Plugin.iOSUnified/CalendarsImplementation.cs b/Calendars/Calendars.Plugin.iOSUnified/CalendarsImplementation.cs index be26eda..9cc278f 100644 --- a/Calendars/Calendars.Plugin.iOSUnified/CalendarsImplementation.cs +++ b/Calendars/Calendars.Plugin.iOSUnified/CalendarsImplementation.cs @@ -154,7 +154,9 @@ public async Task AddOrUpdateCalendarAsync(Calendar calendar) calendar.ExternalID = deviceCalendar.CalendarIdentifier; // Update color in case iOS assigned one +#if !NET6_0 if (deviceCalendar.CGColor != null) +#endif { calendar.Color = ColorConversion.ToHexColor(deviceCalendar.CGColor); } @@ -394,7 +396,7 @@ public async Task DeleteCalendarAsync(Calendar calendar) public async Task DeleteEventAsync(Calendar calendar, CalendarEvent calendarEvent) { // TODO: Remove redundant null check after migrating to .net6 - if (calendar.ExternalID == null || string.IsNullOrEmpty(calendar.ExternalID) + if (calendar.ExternalID == null || string.IsNullOrEmpty(calendar.ExternalID) || calendarEvent.ExternalID == null || string.IsNullOrEmpty(calendarEvent.ExternalID)) { return false; @@ -558,7 +560,7 @@ private async Task RequestCalendarAccess() /// check that there exists at least one calendar for that source. /// d. We do not know if we can save to a calendar source until we actually try to do /// so. Hence the repeated save attempts. - /// + /// /// Full lengthy discussion at https://github.com/TheAlmightyBob/Calendars/issues/10 /// /// The new native calendar. diff --git a/Calendars/Calendars.Plugin/CrossCalendars.cs b/Calendars/Calendars.Plugin/CrossCalendars.cs index a8620f6..e3e89ca 100644 --- a/Calendars/Calendars.Plugin/CrossCalendars.cs +++ b/Calendars/Calendars.Plugin/CrossCalendars.cs @@ -1,4 +1,4 @@ -using Plugin.Calendars.Abstractions; +using Plugin.Calendars.Abstractions; using System; using System.Threading; @@ -31,7 +31,7 @@ public static ICalendars Current static ICalendars? CreateCalendars() { -#if NETSTANDARD1_0 +#if NETSTANDARD1_0 || (NET6_0 && !ANDROID && !IOS && !MACCATALYST && !WINDOWS) return null; #else return new CalendarsImplementation(); From 42bbd80055c1e69ce774b85469fcb8c96f797500 Mon Sep 17 00:00:00 2001 From: Christoph Fink Date: Mon, 10 Jan 2022 08:06:13 +0100 Subject: [PATCH 2/7] Improved #if condition Co-authored-by: Maksym Koshovyi --- .../Calendars.Plugin.iOSUnified/CalendarsImplementation.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Calendars/Calendars.Plugin.iOSUnified/CalendarsImplementation.cs b/Calendars/Calendars.Plugin.iOSUnified/CalendarsImplementation.cs index 9cc278f..8ae976d 100644 --- a/Calendars/Calendars.Plugin.iOSUnified/CalendarsImplementation.cs +++ b/Calendars/Calendars.Plugin.iOSUnified/CalendarsImplementation.cs @@ -154,7 +154,7 @@ public async Task AddOrUpdateCalendarAsync(Calendar calendar) calendar.ExternalID = deviceCalendar.CalendarIdentifier; // Update color in case iOS assigned one -#if !NET6_0 +#if !NET if (deviceCalendar.CGColor != null) #endif { From 2d165288d6dc84806b1d1bec586f8fdbb222bc6a Mon Sep 17 00:00:00 2001 From: Christoph Fink Date: Mon, 10 Jan 2022 08:06:48 +0100 Subject: [PATCH 3/7] Improved #if condition Co-authored-by: Maksym Koshovyi --- Calendars/Calendars.Plugin/CrossCalendars.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Calendars/Calendars.Plugin/CrossCalendars.cs b/Calendars/Calendars.Plugin/CrossCalendars.cs index e3e89ca..af488e8 100644 --- a/Calendars/Calendars.Plugin/CrossCalendars.cs +++ b/Calendars/Calendars.Plugin/CrossCalendars.cs @@ -31,7 +31,7 @@ public static ICalendars Current static ICalendars? CreateCalendars() { -#if NETSTANDARD1_0 || (NET6_0 && !ANDROID && !IOS && !MACCATALYST && !WINDOWS) +#if NETSTANDARD1_0 || (NET && !ANDROID && !IOS && !MACCATALYST && !WINDOWS) return null; #else return new CalendarsImplementation(); From 369d445024fac5aae59c26c13aeef6d1f6b7a947 Mon Sep 17 00:00:00 2001 From: Christoph Fink Date: Mon, 10 Jan 2022 08:07:46 +0100 Subject: [PATCH 4/7] Add null-forgiving Co-authored-by: Maksym Koshovyi --- .../Calendars.Plugin.iOSUnified/CalendarsImplementation.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Calendars/Calendars.Plugin.iOSUnified/CalendarsImplementation.cs b/Calendars/Calendars.Plugin.iOSUnified/CalendarsImplementation.cs index 8ae976d..c3acce9 100644 --- a/Calendars/Calendars.Plugin.iOSUnified/CalendarsImplementation.cs +++ b/Calendars/Calendars.Plugin.iOSUnified/CalendarsImplementation.cs @@ -155,7 +155,7 @@ public async Task AddOrUpdateCalendarAsync(Calendar calendar) // Update color in case iOS assigned one #if !NET - if (deviceCalendar.CGColor != null) + if (deviceCalendar.CGColor != null!) #endif { calendar.Color = ColorConversion.ToHexColor(deviceCalendar.CGColor); From 7e4e9d1f8e41fe82d6f19e63d452c1321cd28d12 Mon Sep 17 00:00:00 2001 From: Christoph Fink Date: Mon, 10 Jan 2022 08:09:07 +0100 Subject: [PATCH 5/7] remove #if --- .../Calendars.Plugin.iOSUnified/CalendarsImplementation.cs | 2 -- 1 file changed, 2 deletions(-) diff --git a/Calendars/Calendars.Plugin.iOSUnified/CalendarsImplementation.cs b/Calendars/Calendars.Plugin.iOSUnified/CalendarsImplementation.cs index c3acce9..0841ece 100644 --- a/Calendars/Calendars.Plugin.iOSUnified/CalendarsImplementation.cs +++ b/Calendars/Calendars.Plugin.iOSUnified/CalendarsImplementation.cs @@ -154,9 +154,7 @@ public async Task AddOrUpdateCalendarAsync(Calendar calendar) calendar.ExternalID = deviceCalendar.CalendarIdentifier; // Update color in case iOS assigned one -#if !NET if (deviceCalendar.CGColor != null!) -#endif { calendar.Color = ColorConversion.ToHexColor(deviceCalendar.CGColor); } From 54c006dc5b68d66e942b851bd79842cb1de4b08b Mon Sep 17 00:00:00 2001 From: Christoph Fink Date: Mon, 10 Jan 2022 08:12:52 +0100 Subject: [PATCH 6/7] Improved platform conditions --- .../Calendars.Plugin.MAUI.csproj | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Calendars/Calendars.Plugin.MAUI/Calendars.Plugin.MAUI.csproj b/Calendars/Calendars.Plugin.MAUI/Calendars.Plugin.MAUI.csproj index 5b0bf0f..6f70a6a 100644 --- a/Calendars/Calendars.Plugin.MAUI/Calendars.Plugin.MAUI.csproj +++ b/Calendars/Calendars.Plugin.MAUI/Calendars.Plugin.MAUI.csproj @@ -9,9 +9,9 @@ False True - 14.2 - 14.0 - 21.0 + 14.2 + 14.0 + 21.0 10.0.17763.0 10.0.17763.0 @@ -27,14 +27,14 @@ - + - + @@ -43,7 +43,7 @@ - + From 019eb5a7dc038ca339ddd6109e2a83663a64d97e Mon Sep 17 00:00:00 2001 From: Christoph Fink Date: Mon, 10 Jan 2022 18:57:18 +0100 Subject: [PATCH 7/7] Update Calendars.nuspec --- Calendars.nuspec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Calendars.nuspec b/Calendars.nuspec index 3036e0c..0eac255 100644 --- a/Calendars.nuspec +++ b/Calendars.nuspec @@ -2,7 +2,7 @@ CClarke.Plugin.Calendars - 1.2.0 + 1.2.0-preview11 Calendars API Plugin for Xamarin and Windows Caleb Clarke Caleb Clarke @@ -20,7 +20,7 @@ See project site README for usage notes and limitations. 1.2.0 changes: -Add .NET MAUI support. +Add .NET MAUI preview 11 support. 1.1.0 changes: