Skip to content

Commit

Permalink
[EventKit] Add support for Xcode 15 beta 7 (#18863)
Browse files Browse the repository at this point in the history
Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com>
Co-authored-by: Alex Soto <alex@soto.dev>
  • Loading branch information
3 people committed Sep 1, 2023
1 parent ddf2ad8 commit d69e463
Show file tree
Hide file tree
Showing 13 changed files with 24 additions and 32 deletions.
1 change: 1 addition & 0 deletions src/EventKit/EKEnums.cs
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@ public enum EKAuthorizationStatus : long {
Restricted,
Denied,
Authorized,
WriteOnly,
}

[Native]
Expand Down
20 changes: 20 additions & 0 deletions src/eventkit.cs
Original file line number Diff line number Diff line change
Expand Up @@ -672,16 +672,36 @@ interface EKEventStore {
EKSource [] DelegateSources { get; }

[MacCatalyst (13, 1)]
[Deprecated (PlatformName.iOS, 17, 0, message: "Use RequestFullAccessToEvents, RequestWriteOnlyAccessToEvents, or RequestFullAccessToReminders.")]
[Deprecated (PlatformName.MacOSX, 14, 0, message: "Use RequestFullAccessToEvents, RequestWriteOnlyAccessToEvents, or RequestFullAccessToReminders.")]
[Deprecated (PlatformName.WatchOS, 10, 0, message: "Use RequestFullAccessToEvents, RequestWriteOnlyAccessToEvents, or RequestFullAccessToReminders.")]
[Deprecated (PlatformName.MacCatalyst, 17, 0, message: "Use RequestFullAccessToEvents, RequestWriteOnlyAccessToEvents, or RequestFullAccessToReminders.")]
[Export ("requestAccessToEntityType:completion:")]
[Async]
void RequestAccess (EKEntityType entityType, Action<bool, NSError> completionHandler);

[Watch (10, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)]
[Export ("requestFullAccessToEventsWithCompletion:")]
[Async]
void RequestFullAccessToEvents (EKEventStoreRequestAccessCompletionHandler completion);

[Watch (10, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)]
[Export ("requestWriteOnlyAccessToEventsWithCompletion:")]
[Async]
void RequestWriteOnlyAccessToEvents (EKEventStoreRequestAccessCompletionHandler completion);

[Watch (10, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)]
[Export ("requestFullAccessToRemindersWithCompletion:")]
[Async]
void RequestFullAccessToReminders (EKEventStoreRequestAccessCompletionHandler completion);

[MacCatalyst (13, 1)]
[Static]
[Export ("authorizationStatusForEntityType:")]
EKAuthorizationStatus GetAuthorizationStatus (EKEntityType entityType);
}

delegate void EKEventStoreRequestAccessCompletionHandler (bool didRequestAccess, NSError error);
delegate void EKEventSearchCallback (EKEvent theEvent, ref bool stop);

[BaseType (typeof (EKCalendarItem))]
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
## extra value so the enum is easier to create
!extra-enum-value! Managed value 0 for EKWeekday.NotSet not found in native headers
## `Last` value can change overtime - which would be a breaking change for us
!missing-enum-value! EKErrorCode native value EKErrorLast = 37 not bound
3 changes: 0 additions & 3 deletions tests/xtro-sharpie/api-annotations-dotnet/iOS-EventKit.ignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,2 @@
## only available on OSX (NA or unused in iOS)
!missing-enum! EKAlarmType not bound

## `Last` value can change overtime - which would be a breaking change for us
!missing-enum-value! EKErrorCode native value EKErrorLast = 37 not bound
5 changes: 0 additions & 5 deletions tests/xtro-sharpie/api-annotations-dotnet/iOS-EventKit.todo

This file was deleted.

5 changes: 0 additions & 5 deletions tests/xtro-sharpie/api-annotations-dotnet/macOS-EventKit.todo

This file was deleted.

1 change: 1 addition & 0 deletions tests/xtro-sharpie/common-EventKit.ignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
## extra value so the enum is easier to create
!extra-enum-value! Managed value 0 for EKWeekday.NotSet not found in native headers
## `Last` value can change overtime - which would be a breaking change for us
!missing-enum-value! EKErrorCode native value EKErrorLast = 37 not bound
1 change: 0 additions & 1 deletion tests/xtro-sharpie/iOS-EventKit.ignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
## only available on OSX (NA or unused in iOS)
!missing-enum! EKAlarmType not bound
!missing-enum-value! EKErrorCode native value EKErrorLast = 37 not bound
5 changes: 0 additions & 5 deletions tests/xtro-sharpie/iOS-EventKit.todo

This file was deleted.

5 changes: 0 additions & 5 deletions tests/xtro-sharpie/macOS-EventKit.todo

This file was deleted.

1 change: 0 additions & 1 deletion tests/xtro-sharpie/watchOS-EventKit.ignore

This file was deleted.

5 changes: 0 additions & 5 deletions tests/xtro-sharpie/watchOS-EventKit.todo

This file was deleted.

4 comments on commit d69e463

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

Please sign in to comment.