Skip to content

Commit

Permalink
[CallKit] Add support for Xcode beta 1 & 2. (#15411)
Browse files Browse the repository at this point in the history
* [CallKit] Add support for Xcode beta 1 & 2.

* Do not add catalyst 13.0 since it is not needed.

* Fix wrongly added types to watchOS.
  • Loading branch information
mandel-macaque authored Jul 8, 2022
1 parent 111f37f commit 5b3c844
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 161 deletions.
50 changes: 25 additions & 25 deletions src/callkit.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@

namespace CallKit {

[iOS (10, 0), NoMac]
[iOS (10, 0), NoMac, NoWatch]
[Native]
public enum CXCallDirectoryEnabledStatus : long {
Unknown = 0,
Disabled = 1,
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)]
[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)]
[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)]
[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)]
[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)]
[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)]
[BaseType (typeof (NSObject))]
interface CXCallController {

Expand All @@ -255,7 +255,7 @@ interface CXCallController {
void RequestTransaction (CXAction action, Action<NSError> completion);
}

[iOS (10, 0), NoMac]
[iOS (10, 0), NoMac, NoWatch]
[BaseType (typeof (NSExtensionContext))]
interface CXCallDirectoryExtensionContext {

Expand All @@ -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, NoWatch]
[Protocol][Model]
[BaseType (typeof (NSObject))]
interface CXCallDirectoryExtensionContextDelegate {
Expand All @@ -305,7 +305,7 @@ interface CXCallDirectoryExtensionContextDelegate {
void RequestFailed (CXCallDirectoryExtensionContext extensionContext, NSError error);
}

[iOS (10, 0), NoMac]
[iOS (10, 0), NoMac, NoWatch]
[BaseType (typeof (NSObject))]
interface CXCallDirectoryManager {

Expand All @@ -327,15 +327,15 @@ interface CXCallDirectoryManager {
void OpenSettings ([NullAllowed] Action<NSError> completion);
}

[iOS (10, 0), NoMac]
[iOS (10, 0), NoMac, NoWatch]
[BaseType (typeof (NSObject))]
interface CXCallDirectoryProvider : NSExtensionRequestHandling {

}

interface ICXCallObserverDelegate { }

[iOS (10, 0), NoMac]
[iOS (10, 0), NoMac, Watch (9,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)]
[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)]
[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)]
[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)]
[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)]
[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)]
[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)]
[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)]
[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)]
[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)]
[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},

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

5 comments on commit 5b3c844

@vs-mobiletools-engineering-service2
Copy link
Collaborator

Choose a reason for hiding this comment

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

💻 [CI Build] Tests on macOS Mac Catalina (10.15) passed 💻

All tests on macOS Mac Catalina (10.15) passed.

Pipeline on Agent
Hash: 5b3c844ba95a0d511e5d7fe7b4ff0adbcaaded80 [CI build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

Choose a reason for hiding this comment

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

❌ [CI Build] Tests on macOS M1 - Mac Big Sur (11.5) failed ❌

Failed tests are:

  • monotouch-test

Pipeline on Agent
Hash: 5b3c844ba95a0d511e5d7fe7b4ff0adbcaaded80 [CI build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

Choose a reason for hiding this comment

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

✅ API diff for current PR / commit

Legacy Xamarin (No breaking changes)
  • iOS (no change detected)
  • tvOS (no change detected)
  • watchOS: vsdrops gist (No breaking changes)
  • macOS (no change detected)
NET (empty diffs)
  • iOS: (empty diff detected)
  • tvOS: (empty diff detected)
  • MacCatalyst: (empty diff detected)
  • macOS: (empty diff detected)

❗ API diff vs stable (Breaking changes)

Legacy Xamarin (:heavy_exclamation_mark: Breaking changes :heavy_exclamation_mark:)
  • iOS: vsdrops gist (:heavy_exclamation_mark: Breaking changes :heavy_exclamation_mark:)
  • tvOS: vsdrops gist (:heavy_exclamation_mark: Breaking changes :heavy_exclamation_mark:)
  • watchOS: vsdrops gist (:heavy_exclamation_mark: Breaking changes :heavy_exclamation_mark:)
  • macOS: vsdrops gist (:heavy_exclamation_mark: Breaking changes :heavy_exclamation_mark:)
.NET (:heavy_exclamation_mark: Breaking changes :heavy_exclamation_mark:)
  • iOS: vsdrops gist (:heavy_exclamation_mark: Breaking changes :heavy_exclamation_mark:)
  • tvOS: vsdrops gist (:heavy_exclamation_mark: Breaking changes :heavy_exclamation_mark:)
  • MacCatalyst: vsdrops gist (:heavy_exclamation_mark: Breaking changes :heavy_exclamation_mark:)
  • macOS: vsdrops gist (:heavy_exclamation_mark: Breaking changes :heavy_exclamation_mark:)
  • Microsoft.iOS vs Microsoft.MacCatalyst: vsdrops gist
Legacy Xamarin (stable) vs .NET

ℹ️ Generator diff

Generator Diff: vsdrops (html) vsdrops (raw diff) gist (raw diff) - Please review changes)

Pipeline on Agent
Hash: 5b3c844ba95a0d511e5d7fe7b4ff0adbcaaded80 [CI build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

Choose a reason for hiding this comment

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

🔥 [CI Build] Test results 🔥

Test results

❌ Tests failed on VSTS: simulator tests

🎉 All 178 tests passed 🎉

Failures

❌ dotnettests tests

🔥 Failed catastrophically on VSTS: simulator tests - dotnettests (no summary found).

Html Report (VSDrops) Download

❌ fsharp tests

🔥 Failed catastrophically on VSTS: simulator tests - fsharp (no summary found).

Html Report (VSDrops) Download

❌ framework tests

🔥 Failed catastrophically on VSTS: simulator tests - framework (no summary found).

Html Report (VSDrops) Download

❌ generator tests

🔥 Failed catastrophically on VSTS: simulator tests - generator (no summary found).

Html Report (VSDrops) Download

❌ interdependent_binding_projects tests

🔥 Failed catastrophically on VSTS: simulator tests - interdependent_binding_projects (no summary found).

Html Report (VSDrops) Download

❌ install_source tests

🔥 Failed catastrophically on VSTS: simulator tests - install_source (no summary found).

Html Report (VSDrops) Download

❌ introspection tests

🔥 Failed catastrophically on VSTS: simulator tests - introspection (no summary found).

Html Report (VSDrops) Download

❌ mtouch tests

🔥 Failed catastrophically on VSTS: simulator tests - mtouch (no summary found).

Html Report (VSDrops) Download

❌ xcframework tests

🔥 Failed catastrophically on VSTS: simulator tests - xcframework (no summary found).

Html Report (VSDrops) Download

❌ xtro tests

🔥 Failed catastrophically on VSTS: simulator tests - xtro (no summary found).

Html Report (VSDrops) Download

Successes

✅ bcl: All 69 tests passed. Html Report (VSDrops) Download
✅ cecil: All 1 tests passed. Html Report (VSDrops) Download
✅ linker: All 65 tests passed. Html Report (VSDrops) Download
✅ mac_binding_project: All 1 tests passed. Html Report (VSDrops) Download
✅ mmp: All 2 tests passed. Html Report (VSDrops) Download
✅ mononative: All 12 tests passed. Html Report (VSDrops) Download
✅ monotouch: All 23 tests passed. Html Report (VSDrops) Download
✅ msbuild: All 2 tests passed. Html Report (VSDrops) Download
✅ xammac: All 3 tests passed. Html Report (VSDrops) Download

Pipeline on Agent
Hash: [CI build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

Choose a reason for hiding this comment

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

📚 [CI Build] Artifacts 📚

Packages generated

View packages

Pipeline on Agent XAMMINI-058.Monterey'
Hash: 5b3c844ba95a0d511e5d7fe7b4ff0adbcaaded80 [CI build]

Please sign in to comment.