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

[CallKit] Add support for Xcode beta 1 & 2. #15411

Merged
merged 4 commits into from
Jul 8, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
42 changes: 21 additions & 21 deletions src/callkit.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public enum CXCallDirectoryEnabledStatus : long {
Enabled = 2
}

[iOS (10, 0), NoMac]
[iOS (10, 0), NoMac, MacCatalyst (14,0), Watch (9,0)]
[ErrorDomain ("CXErrorDomain")]
[Native]
public enum CXErrorCode : long {
Expand Down Expand Up @@ -77,7 +77,7 @@ public enum CXErrorCodeCallDirectoryManagerError : long {
UnexpectedIncrementalRemoval = 8,
}

[iOS (14,5), NoWatch, NoTV, NoMac]
[iOS (14,5), Watch (9,0), NoTV, NoMac]
[Introduced (PlatformName.MacCatalyst, 14, 5)]
[ErrorDomain ("CXErrorDomainNotificationServiceExtension")]
[Native]
Expand Down Expand Up @@ -135,7 +135,7 @@ public enum CXHandleType : long {
EmailAddress = 3,
}

[iOS (10, 0), NoMac]
[iOS (10, 0), NoMac, Watch (9,0), MacCatalyst (13,0)]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mac Catalyst 13.0? Or should that be 16.0?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the default, I made a mistake, will fix those.

[BaseType (typeof (NSObject))]
[DisableDefaultCtor]
interface CXHandle : NSCopying, NSSecureCoding {
Expand All @@ -154,7 +154,7 @@ interface CXHandle : NSCopying, NSSecureCoding {
bool IsEqual (CXHandle handle);
}

[iOS (10, 0), NoMac]
[iOS (10, 0), NoMac, Watch (9,0), MacCatalyst (13,0)]
[BaseType (typeof (NSObject))]
[DisableDefaultCtor] // designated
interface CXAction : NSCopying, NSSecureCoding {
Expand All @@ -179,7 +179,7 @@ interface CXAction : NSCopying, NSSecureCoding {
void Fail ();
}

[iOS (10, 0), NoMac]
[iOS (10, 0), NoMac, Watch (9,0), MacCatalyst (13,0)]
[BaseType (typeof (CXCallAction))]
[DisableDefaultCtor]
interface CXAnswerCallAction {
Expand All @@ -192,7 +192,7 @@ interface CXAnswerCallAction {
void Fulfill (NSDate dateConnected);
}

[iOS (10, 0), NoMac]
[iOS (10, 0), NoMac, Watch (9,0), MacCatalyst (13,0)]
[BaseType (typeof (NSObject))]
[DisableDefaultCtor]
interface CXCall {
Expand All @@ -216,7 +216,7 @@ interface CXCall {
bool IsEqual (CXCall call);
}

[iOS (10, 0), NoMac]
[iOS (10, 0), NoMac, Watch (9,0), MacCatalyst (13,0)]
[BaseType (typeof (CXAction))]
[DisableDefaultCtor]
interface CXCallAction {
Expand All @@ -229,7 +229,7 @@ interface CXCallAction {
NativeHandle Constructor (NSUuid callUuid);
}

[iOS (10, 0), NoMac]
[iOS (10, 0), NoMac, Watch (9,0), MacCatalyst (13,0)]
[BaseType (typeof (NSObject))]
interface CXCallController {

Expand Down Expand Up @@ -269,7 +269,7 @@ interface CXCallDirectoryExtensionContext {
[Export ("completeRequestWithCompletionHandler:")]
void CompleteRequest ([NullAllowed] Action<bool> completion);

[NullAllowed, Export ("delegate", ArgumentSemantic.Weak)]
[NullAllowed, Export ("delegate", ArgumentSemantic.Weak), NoWatch]
ICXCallDirectoryExtensionContextDelegate Delegate { get; set; }

[iOS (11, 0)]
Expand All @@ -295,7 +295,7 @@ interface CXCallDirectoryExtensionContext {

interface ICXCallDirectoryExtensionContextDelegate {}

[iOS (10, 0), NoMac]
[iOS (10, 0), NoMac, MacCatalyst (13,0), NoWatch]
[Protocol][Model]
[BaseType (typeof (NSObject))]
interface CXCallDirectoryExtensionContextDelegate {
Expand Down Expand Up @@ -335,7 +335,7 @@ interface CXCallDirectoryProvider : NSExtensionRequestHandling {

interface ICXCallObserverDelegate { }

[iOS (10, 0), NoMac]
[iOS (10, 0), NoMac, Watch (9,0), MacCatalyst (13,0)]
[Protocol, Model]
[BaseType (typeof (NSObject))]
interface CXCallObserverDelegate {
Expand All @@ -356,7 +356,7 @@ interface CXCallObserver {
void SetDelegate ([NullAllowed] ICXCallObserverDelegate aDelegate, [NullAllowed] DispatchQueue queue);
}

[iOS (10, 0), NoMac]
[iOS (10, 0), NoMac, Watch (9,0), MacCatalyst (13,0)]
[BaseType (typeof (NSObject))]
interface CXCallUpdate : NSCopying {

Expand All @@ -382,7 +382,7 @@ interface CXCallUpdate : NSCopying {
bool HasVideo { get; set; }
}

[iOS (10, 0), NoMac]
[iOS (10, 0), NoMac, Watch (9,0), MacCatalyst (13,0)]
[DisableDefaultCtor]
[BaseType (typeof (CXCallAction))]
interface CXEndCallAction {
Expand All @@ -395,7 +395,7 @@ interface CXEndCallAction {
void Fulfill (NSDate dateEnded);
}

[iOS (10, 0), NoMac]
[iOS (10, 0), NoMac, Watch (9,0), MacCatalyst (13,0)]
[DisableDefaultCtor]
[BaseType (typeof (CXCallAction), Name = "CXPlayDTMFCallAction")]
interface CXPlayDtmfCallAction {
Expand All @@ -414,7 +414,7 @@ interface CXPlayDtmfCallAction {
interface ICXProviderDelegate { }

[Protocol, Model]
[iOS (10, 0), NoMac]
[iOS (10, 0), NoMac, Watch (9,0), MacCatalyst (13,0)]
[BaseType (typeof (NSObject))]
interface CXProviderDelegate {

Expand Down Expand Up @@ -509,7 +509,7 @@ interface CXProvider {
CXCallAction [] GetPendingCallActions (Class callActionClass, NSUuid callUuid);
}

[iOS (10, 0), Mac (11, 0)]
[iOS (10, 0), Mac (11, 0), Watch (9,0), MacCatalyst (13,0)]
[BaseType (typeof (NSObject))]
[DisableDefaultCtor]
interface CXProviderConfiguration : NSCopying {
Expand Down Expand Up @@ -555,7 +555,7 @@ interface CXProviderConfiguration : NSCopying {
NativeHandle Constructor ();
}

[iOS (10, 0)] [NoMac]
[iOS (10, 0)] [NoMac] [Watch (9,0), MacCatalyst (13,0)]
[BaseType (typeof (CXCallAction))]
[DisableDefaultCtor]
interface CXSetGroupCallAction {
Expand All @@ -568,7 +568,7 @@ interface CXSetGroupCallAction {
NSUuid CallUuidToGroupWith { get; set; }
}

[iOS (10, 0), NoMac]
[iOS (10, 0), NoMac, Watch (9,0), MacCatalyst (13,0)]
[DisableDefaultCtor]
[BaseType (typeof (CXCallAction))]
interface CXSetHeldCallAction {
Expand All @@ -581,7 +581,7 @@ interface CXSetHeldCallAction {
bool OnHold { [Bind ("isOnHold")] get; set; }
}

[iOS (10, 0), NoMac]
[iOS (10, 0), NoMac, Watch (9,0), MacCatalyst (13,0)]
[BaseType (typeof (CXCallAction))]
[DisableDefaultCtor]
interface CXSetMutedCallAction {
Expand All @@ -594,7 +594,7 @@ interface CXSetMutedCallAction {
bool Muted { [Bind ("isMuted")] get; set; }
}

[iOS (10, 0), NoMac]
[iOS (10, 0), NoMac, Watch (9,0), MacCatalyst (13,0)]
[DisableDefaultCtor]
[BaseType (typeof (CXCallAction))]
interface CXStartCallAction {
Expand All @@ -618,7 +618,7 @@ interface CXStartCallAction {
void Fulfill (NSDate dateStarted);
}

[iOS (10, 0), NoMac]
[iOS (10, 0), NoMac, Watch (9,0), MacCatalyst (13,0)]
[BaseType (typeof (NSObject))]
[DisableDefaultCtor] // there's a designated initializer that does not accept null
interface CXTransaction : NSCopying, NSSecureCoding {
Expand Down
1 change: 1 addition & 0 deletions src/frameworks.sources
Original file line number Diff line number Diff line change
Expand Up @@ -2189,6 +2189,7 @@ IOS_FRAMEWORKS = \

WATCHOS_FRAMEWORKS = \
$(COMMON_FRAMEWORKS) \
CallKit \
Chip \
ClockKit \
CloudKit \
Expand Down
136 changes: 0 additions & 136 deletions tests/xtro-sharpie/watchOS-CallKit.todo

This file was deleted.

2 changes: 2 additions & 0 deletions tools/common/Frameworks.cs
Original file line number Diff line number Diff line change
Expand Up @@ -518,6 +518,8 @@ public static Frameworks GetwatchOSFrameworks (bool is_simulator_build)
{ "NearbyInteraction", "NearbyInteraction", 8,0 },
{ "OSLog", "OSLog", 8,0 },
{ "ShazamKit", "ShazamKit", new Version (8, 0), NotAvailableInSimulator},

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extra newline here for a reason?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@chamons following the pattern in the code. There is a new line per version. One after 4, 5, 6, etc..

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stupid context specific diff, did not notice.

{ "CallKit", "CallKit", 9,0 },
};
}
return watch_frameworks;
Expand Down