Skip to content

Commit

Permalink
Merge branch 'main' into Xcode13-DeviceCheck-beta1
Browse files Browse the repository at this point in the history
  • Loading branch information
rachelkang authored Jul 7, 2021
2 parents 3b122e6 + 3b6f059 commit 48a3c23
Show file tree
Hide file tree
Showing 9 changed files with 88 additions and 83 deletions.
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);

[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);

[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), Name = "EKVirtualConferenceURLDescriptor")]
[DisableDefaultCtor]
interface EKVirtualConferenceUrlDescriptor
{
[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.

2 changes: 1 addition & 1 deletion tools/devops/automation/build-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ schedules:

# the translations team wants a green build, we can do that on sundays even if
# the code did not change and without the device tests.
- cron: "0 18 * * 1-5,0"
- cron: "0 12 * * 0"
displayName: Weekly Translations build (Sunday @ noon)
branches:
include:
Expand Down

0 comments on commit 48a3c23

Please sign in to comment.