Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[EventKit] Updates for Xcode13 Beta1 #12022

Merged
merged 9 commits into from
Jul 1, 2021
Merged
Show file tree
Hide file tree
Changes from 7 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
1 change: 1 addition & 0 deletions src/EventKit/EKEnums.cs
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ public enum EKErrorCode : long {
SourceMismatch,
NotificationCollectionMismatch,
NotificationSavedWithoutCollection,
ReminderAlarmContainsEmailOrUrl,
}

// untyped enum -> EKTypes.h
Expand Down
69 changes: 68 additions & 1 deletion src/eventkit.cs
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,7 @@ IntPtr Constructor (EKRecurrenceFrequency type, nint interval, [NullAllowed] EKR

[BaseType (typeof (NSObject))]
interface EKEventStore {
[NoiOS, Mac (10,11), NoWatch]
[NoiOS, Mac (10,11), NoWatch, NoMacCatalyst]
[Export ("initWithSources:")]
IntPtr Constructor (EKSource[] sources);

Expand Down Expand Up @@ -657,4 +657,71 @@ interface EKReminder {
[Static]
EKReminder Create (EKEventStore eventStore);
}

[Mac (12,0), iOS (15,0), Watch (8,0), MacCatalyst (15,0), NoTV]
[BaseType (typeof (NSObject))]
[DisableDefaultCtor]
interface EKVirtualConferenceDescriptor
{
[Export ("initWithTitle:URLDescriptors:conferenceDetails:")]
[DesignatedInitializer]
IntPtr Constructor ([NullAllowed] string title, EKVirtualConferenceURLDescriptor[] urlDescriptors, [NullAllowed] string conferenceDetails);
tj-devel709 marked this conversation as resolved.
Show resolved Hide resolved

[NullAllowed, Export ("title")]
string Title { get; }

[Export ("URLDescriptors", ArgumentSemantic.Copy)]
EKVirtualConferenceURLDescriptor[] UrlDescriptors { get; }

[NullAllowed, Export ("conferenceDetails")]
string ConferenceDetails { get; }
}

delegate void VirtualConferenceRoomTypeHandler (NSArray<EKVirtualConferenceRoomTypeDescriptor> virtualConferenceRoomTypeDescriptor, NSError error);
delegate void VirtualConferenceHandler (EKVirtualConferenceDescriptor virtualConferenceDescriptor, NSError error);
tj-devel709 marked this conversation as resolved.
Show resolved Hide resolved

[Mac (12,0), iOS (15,0), Watch (8,0), MacCatalyst (15,0), NoTV]
[BaseType (typeof (NSObject))]
interface EKVirtualConferenceProvider : NSExtensionRequestHandling
{
[Async]
[Export ("fetchAvailableRoomTypesWithCompletionHandler:")]
void FetchAvailableRoomTypes (VirtualConferenceRoomTypeHandler handler);

[Async]
[Export ("fetchVirtualConferenceForIdentifier:completionHandler:")]
void FetchVirtualConference (string identifier, VirtualConferenceHandler handler);
}

[Mac (12,0), iOS (15,0), Watch (8,0), MacCatalyst (15,0), NoTV]
[BaseType (typeof (NSObject))]
[DisableDefaultCtor]
interface EKVirtualConferenceRoomTypeDescriptor
{
[Export ("initWithTitle:identifier:")]
[DesignatedInitializer]
IntPtr Constructor (string title, string identifier);

[Export ("title")]
string Title { get; }

[Export ("identifier")]
string Identifier { get; }
}

[Mac (12,0), iOS (15,0), Watch (8,0), MacCatalyst (15,0), NoTV]
[BaseType (typeof (NSObject))]
[DisableDefaultCtor]
interface EKVirtualConferenceURLDescriptor
tj-devel709 marked this conversation as resolved.
Show resolved Hide resolved
{
[Export ("initWithTitle:URL:")]
[DesignatedInitializer]
IntPtr Constructor ([NullAllowed] string title, NSUrl url);

[NullAllowed, Export ("title")]
string Title { get; }

[Export ("URL", ArgumentSemantic.Copy)]
NSUrl Url { get; }
}
}
17 changes: 17 additions & 0 deletions tests/xtro-sharpie/MacCatalyst-EventKit.ignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,19 @@
# It's in the documentation and headers, but throws a "+[EKCalendar calendarWithEventStore:]: unrecognized selector" exception at runtime
!missing-selector! +EKCalendar::calendarWithEventStore: not bound

# This is only used as an output in a manual binding so it doesn't need the availability
!missing-enum! EKAlarmType not bound

# These say the class supports MacCatalyst, but the selectors individually do not
!missing-selector! EKEventStore::initWithSources: not bound
!missing-selector! EKAlarm::emailAddress not bound
!missing-selector! EKAlarm::setEmailAddress: not bound
!missing-selector! EKAlarm::setSoundName: not bound
!missing-selector! EKAlarm::setUrl: not bound
!missing-selector! EKAlarm::soundName not bound
!missing-selector! EKAlarm::type not bound
!missing-selector! EKAlarm::url not bound

# These two are deprecated
!missing-selector! EKEvent::birthdayPersonUniqueID not bound
!missing-selector! EKEventStore::initWithAccessToEntityTypes: not bound
28 changes: 0 additions & 28 deletions tests/xtro-sharpie/MacCatalyst-EventKit.todo

This file was deleted.

2 changes: 1 addition & 1 deletion tests/xtro-sharpie/common-EventKit.ignore
Original file line number Diff line number Diff line change
@@ -1,4 +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 = 36 not bound
!missing-enum-value! EKErrorCode native value EKErrorLast = 37 not bound
18 changes: 0 additions & 18 deletions tests/xtro-sharpie/iOS-EventKit.todo

This file was deleted.

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

This file was deleted.

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

This file was deleted.