Skip to content

Commit

Permalink
[src] Use [NoMacCatalyst] everywhere. (#12407)
Browse files Browse the repository at this point in the history
  • Loading branch information
rolfbjarne authored Aug 12, 2021
1 parent 1c937ac commit ef6793f
Show file tree
Hide file tree
Showing 19 changed files with 80 additions and 106 deletions.
1 change: 0 additions & 1 deletion src/AudioUnit/AudioComponentDescription.cs
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,6 @@ public enum AudioTypeEffect { // OSType in AudioComponentDescription
#endif
[Mac (10,15)]
[Unavailable (PlatformName.MacCatalyst)]
[Advice ("This API is not available when using UIKit on macOS.")]
Reverb2=0x72766232, // 'rvb2'
NBandEq=0x6e626571, // 'nbeq'
}
Expand Down
2 changes: 1 addition & 1 deletion src/SceneKit/Defs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ public enum SCNRenderingApi : ulong
{
Metal,
#if !MONOMAC
[Unavailable (PlatformName.MacCatalyst)][Advice ("This API is not available when using UIKit on macOS.")]
[Unavailable (PlatformName.MacCatalyst)]
OpenGLES2,
#else
OpenGLLegacy,
Expand Down
6 changes: 3 additions & 3 deletions src/Security/SecProtocolOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public void SetLocalIdentity (SecIdentity2 identity)
[Deprecated (PlatformName.iOS, 13,0, message: "Use 'AddTlsCipherSuite (TlsCipherSuite)' instead.")]
[Deprecated (PlatformName.WatchOS, 6,0, message: "Use 'AddTlsCipherSuite (TlsCipherSuite)' instead.")]
[Deprecated (PlatformName.TvOS, 13,0, message: "Use 'AddTlsCipherSuite (TlsCipherSuite)' instead.")]
[Unavailable (PlatformName.MacCatalyst)][Advice ("This API is not available when using UIKit on macOS.")]
[Unavailable (PlatformName.MacCatalyst)]
public void AddTlsCipherSuite (SslCipherSuite cipherSuite) => sec_protocol_options_add_tls_ciphersuite (GetCheckedHandle (), cipherSuite);

[Watch (6,0), TV (13,0), Mac (10,15), iOS (13,0)]
Expand Down Expand Up @@ -88,7 +88,7 @@ public void SetLocalIdentity (SecIdentity2 identity)
[Deprecated (PlatformName.iOS, 13,0, message: "Use 'SetTlsMinVersion (TlsProtocolVersion)' instead.")]
[Deprecated (PlatformName.WatchOS, 6,0, message: "Use 'SetTlsMinVersion (TlsProtocolVersion)' instead.")]
[Deprecated (PlatformName.TvOS, 13,0, message: "Use 'SetTlsMinVersion (TlsProtocolVersion)' instead.")]
[Unavailable (PlatformName.MacCatalyst)][Advice ("This API is not available when using UIKit on macOS.")]
[Unavailable (PlatformName.MacCatalyst)]
public void SetTlsMinVersion (SslProtocol protocol) => sec_protocol_options_set_tls_min_version (GetCheckedHandle (), protocol);

[Watch (6,0), TV (13,0), Mac (10,15), iOS (13,0)]
Expand All @@ -109,7 +109,7 @@ public void SetLocalIdentity (SecIdentity2 identity)
[Deprecated (PlatformName.iOS, 13,0, message: "Use 'SetTlsMaxVersion (TlsProtocolVersion)' instead.")]
[Deprecated (PlatformName.WatchOS, 6,0, message: "Use 'SetTlsMaxVersion (TlsProtocolVersion)' instead.")]
[Deprecated (PlatformName.TvOS, 13,0, message: "Use 'SetTlsMaxVersion (TlsProtocolVersion)' instead.")]
[Unavailable (PlatformName.MacCatalyst)][Advice ("This API is not available when using UIKit on macOS.")]
[Unavailable (PlatformName.MacCatalyst)]
public void SetTlsMaxVersion (SslProtocol protocol) => sec_protocol_options_set_tls_max_version (GetCheckedHandle (), protocol);

[Watch (6,0), TV (13,0), Mac (10,15), iOS (13,0)]
Expand Down
3 changes: 2 additions & 1 deletion src/StoreKit/Enums.cs
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,8 @@ public enum SKProductDiscountPaymentMode : ulong {
}

[NoWatch, NoTV, NoMac, iOS (14,0)]
[Native, Advice ("This API is not available when using UIKit on macOS.")]
[MacCatalyst (14,0)]
[Native]
public enum SKOverlayPosition : long {
SKOverlayPositionBottom = 0,
Raised = 1,
Expand Down
5 changes: 2 additions & 3 deletions src/avfoundation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10993,7 +10993,7 @@ interface AVCaptureDeviceFormat {
bool MultiCamSupported { [Bind ("isMultiCamSupported")] get; }

[NoWatch, NoTV, NoMac, iOS (13, 0)]
[Advice ("This API is not available when using UIKit on macOS.")]
[MacCatalyst (14,0)]
[Export ("globalToneMappingSupported")]
bool GlobalToneMappingSupported { [Bind ("isGlobalToneMappingSupported")] get; }

Expand Down Expand Up @@ -12917,9 +12917,8 @@ interface AVSpeechSynthesizer {
[Export ("paused")]
bool Paused { [Bind ("isPaused")] get; }

[Unavailable (PlatformName.MacCatalyst)]
[Watch (6,0), TV (13,0), NoMac, iOS (13,0)]
[Advice ("This API is not available when using UIKit on macOS.")]
[NoMacCatalyst]
[Export ("usesApplicationAudioSession")]
bool UsesApplicationAudioSession { get; set; }

Expand Down
3 changes: 1 addition & 2 deletions src/callkit.cs
Original file line number Diff line number Diff line change
Expand Up @@ -296,9 +296,8 @@ interface CXCallDirectoryManager {
[Export ("getEnabledStatusForExtensionWithIdentifier:completionHandler:")]
void GetEnabledStatusForExtension (string identifier, Action<CXCallDirectoryEnabledStatus, NSError> completion);

[Unavailable (PlatformName.MacCatalyst)]
[NoMacCatalyst]
[NoWatch, NoTV, NoMac, iOS (13,4)]
[Advice ("This API is not available when using UIKit on macOS.")]
[Async]
[Export ("openSettingsWithCompletionHandler:")]
void OpenSettings ([NullAllowed] Action<NSError> completion);
Expand Down
4 changes: 2 additions & 2 deletions src/coreaudiokit.cs
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ interface CABTMidiLocalPeripheralViewController {

[iOS (8,0)]
[Deprecated (PlatformName.iOS, 13,0, message: "Use 'AudioUnit' instead.")]
[Unavailable (PlatformName.MacCatalyst)][Advice ("This API is not available when using UIKit on macOS.")]
[NoMacCatalyst]
[BaseType (typeof (UIView))]
interface CAInterAppAudioSwitcherView {
[Export ("initWithFrame:")]
Expand All @@ -190,7 +190,7 @@ interface CAInterAppAudioSwitcherView {

[iOS (8,0)]
[Deprecated (PlatformName.iOS, 13,0, message: "Use 'AudioUnit' instead.")]
[Unavailable (PlatformName.MacCatalyst)][Advice ("This API is not available when using UIKit on macOS.")]
[NoMacCatalyst]
[BaseType (typeof (UIView))]
interface CAInterAppAudioTransportView {
[Export ("initWithFrame:")]
Expand Down
8 changes: 4 additions & 4 deletions src/corelocation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -331,13 +331,13 @@ partial interface CLLocationManager {

[NoWatch][NoTV][NoMac]
[Deprecated (PlatformName.iOS, 13,0, message: "Not used anymore. Call will not have any effect.")]
[Unavailable (PlatformName.MacCatalyst)][Advice ("This API is not available when using UIKit on macOS.")]
[NoMacCatalyst]
[Export ("allowDeferredLocationUpdatesUntilTraveled:timeout:")]
void AllowDeferredLocationUpdatesUntil (double distance, double timeout);

[NoWatch][NoTV][NoMac]
[Deprecated (PlatformName.iOS, 13,0, message: "Not used anymore. Call will not have any effect.")]
[Unavailable (PlatformName.MacCatalyst)][Advice ("This API is not available when using UIKit on macOS.")]
[NoMacCatalyst]
[Export ("disallowDeferredLocationUpdates")]
void DisallowDeferredLocationUpdates ();

Expand Down Expand Up @@ -373,7 +373,7 @@ partial interface CLLocationManager {
void RequestState (CLRegion region);

[NoWatch][NoTV][NoMac]
[Unavailable (PlatformName.MacCatalyst)][Advice ("This API is not available when using UIKit on macOS.")]
[NoMacCatalyst]
[Deprecated (PlatformName.iOS, 13,0, message: "Use 'StartRangingBeacons(CLBeaconIdentityConstraint)' instead.")]
[iOS (7,0), Export ("startRangingBeaconsInRegion:")]
void StartRangingBeacons (CLBeaconRegion region);
Expand All @@ -383,7 +383,7 @@ partial interface CLLocationManager {
void StartRangingBeacons (CLBeaconIdentityConstraint constraint);

[NoWatch][NoTV][NoMac]
[Unavailable (PlatformName.MacCatalyst)][Advice ("This API is not available when using UIKit on macOS.")]
[NoMacCatalyst]
[Deprecated (PlatformName.iOS, 13,0, message: "Use 'StopRangingBeacons(CLBeaconIdentityConstraint)' instead.")]
[iOS (7,0), Export ("stopRangingBeaconsInRegion:")]
void StopRangingBeacons (CLBeaconRegion region);
Expand Down
60 changes: 26 additions & 34 deletions src/fileprovider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -326,8 +326,7 @@ interface NSFileProviderDomain {
[Export ("hidden")]
bool Hidden { [Bind ("isHidden")] get; set; }

[Advice ("This API is not available when using UIKit on macOS.")]
[Unavailable (PlatformName.MacCatalyst)]
[NoMacCatalyst]
[NoWatch, NoTV, NoiOS, Mac (11,3)]
[Export ("testingModes", ArgumentSemantic.Assign)]
NSFileProviderDomainTestingModes TestingModes { get; set; }
Expand Down Expand Up @@ -742,8 +741,7 @@ interface NSFileProviderManager {

interface INSFileProviderPendingSetEnumerator { }

[Advice ("This API is not available when using UIKit on macOS.")]
[Unavailable (PlatformName.MacCatalyst)]
[NoMacCatalyst]
[NoWatch, NoTV, NoiOS, Mac (11,3)]
[Protocol]
interface NSFileProviderPendingSetEnumerator : NSFileProviderEnumerator {
Expand Down Expand Up @@ -878,9 +876,8 @@ interface NSFileProviderRequest {
[Export ("requestingExecutable", ArgumentSemantic.Copy)]
NSUrl RequestingExecutable { get; }

[Unavailable (PlatformName.MacCatalyst)]
[NoWatch, NoTV, NoiOS, Mac (11,3)]
[Advice ("This API is not available when using UIKit on macOS.")]
[NoMacCatalyst]
[NullAllowed, Export ("domainVersion")]
NSFileProviderDomainVersion DomainVersion { get; }
}
Expand Down Expand Up @@ -1001,17 +998,15 @@ interface NSFileProviderReplicatedExtension : NSFileProviderEnumerating {
[Export ("materializedItemsDidChangeWithCompletionHandler:")]
void MaterializedItemsDidChange (Action completionHandler);

[Advice ("This API is not available when using UIKit on macOS.")]
[Unavailable (PlatformName.MacCatalyst)]
[NoMacCatalyst]
[NoWatch, NoTV, NoiOS, Mac (11,3)]
[Export ("pendingItemsDidChangeWithCompletionHandler:")]
void PendingItemsDidChange (Action completionHandler);
}

interface INSFileProviderDomainState { }

[Advice ("This API is not available when using UIKit on macOS.")]
[Unavailable (PlatformName.MacCatalyst)]
[NoMacCatalyst]
[NoWatch, NoTV, NoiOS, Mac (11,3)]
[Protocol]
interface NSFileProviderDomainState {
Expand All @@ -1033,8 +1028,7 @@ public enum NSFileProviderDomainTestingModes : ulong {
Interactive = 1uL << 1,
}

[Advice ("This API is not available when using UIKit on macOS.")]
[Unavailable (PlatformName.MacCatalyst)]
[NoMacCatalyst]
[NoWatch, NoTV, NoiOS, Mac (11,3)]
[BaseType (typeof (NSObject))]
[DisableDefaultCtor]
Expand All @@ -1047,9 +1041,9 @@ interface NSFileProviderDomainVersion : NSSecureCoding {
NSComparisonResult Compare (NSFileProviderDomainVersion otherVersion);
}

[Unavailable (PlatformName.MacCatalyst)]
[NoMacCatalyst]
[NoWatch, NoTV, NoiOS, Mac (11,3)]
[Native, Advice ("This API is not available when using UIKit on macOS.")]
[Native]
public enum NSFileProviderTestingOperationType : long {
Ingestion = 0,
Lookup = 1,
Expand All @@ -1063,9 +1057,9 @@ public enum NSFileProviderTestingOperationType : long {

interface INSFileProviderTestingOperation : global::ObjCRuntime.INativeObject { }

[Unavailable (PlatformName.MacCatalyst)]
[NoMacCatalyst]
[NoWatch, NoTV, NoiOS, Mac (11,3)]
[Protocol, Advice ("This API is not available when using UIKit on macOS.")]
[Protocol]
interface NSFileProviderTestingOperation {

[Abstract]
Expand Down Expand Up @@ -1113,19 +1107,19 @@ interface NSFileProviderTestingOperation {
INSFileProviderTestingCollisionResolution GetAsCollisionResolution ();
}

[Unavailable (PlatformName.MacCatalyst)]
[NoMacCatalyst]
[NoWatch, NoTV, NoiOS, Mac (11,3)]
[Native, Advice ("This API is not available when using UIKit on macOS.")]
[Native]
public enum NSFileProviderTestingOperationSide : ulong {
Disk = 0,
FileProvider = 1,
}

interface INSFileProviderTestingIngestion { }

[Unavailable (PlatformName.MacCatalyst)]
[NoMacCatalyst]
[NoWatch, NoTV, NoiOS, Mac (11,3)]
[Protocol, Advice ("This API is not available when using UIKit on macOS.")]
[Protocol]
interface NSFileProviderTestingIngestion : NSFileProviderTestingOperation {

[Abstract]
Expand All @@ -1143,9 +1137,8 @@ interface NSFileProviderTestingIngestion : NSFileProviderTestingOperation {

interface INSFileProviderTestingLookup { }

[Unavailable (PlatformName.MacCatalyst)]
[NoWatch, NoTV, NoiOS, Mac (11,3)]
[Protocol, Advice ("This API is not available when using UIKit on macOS.")]
[Protocol]
interface NSFileProviderTestingLookup : NSFileProviderTestingOperation {

[Abstract]
Expand All @@ -1159,9 +1152,8 @@ interface NSFileProviderTestingLookup : NSFileProviderTestingOperation {

interface INSFileProviderTestingCreation { }

[Unavailable (PlatformName.MacCatalyst)]
[NoWatch, NoTV, NoiOS, Mac (11,3)]
[Protocol, Advice ("This API is not available when using UIKit on macOS.")]
[Protocol]
interface NSFileProviderTestingCreation : NSFileProviderTestingOperation {

[Abstract]
Expand All @@ -1179,9 +1171,9 @@ interface NSFileProviderTestingCreation : NSFileProviderTestingOperation {

interface INSFileProviderTestingModification { }

[Unavailable (PlatformName.MacCatalyst)]
[NoMacCatalyst]
[NoWatch, NoTV, NoiOS, Mac (11,3)]
[Protocol, Advice ("This API is not available when using UIKit on macOS.")]
[Protocol]
interface NSFileProviderTestingModification : NSFileProviderTestingOperation {

[Abstract]
Expand Down Expand Up @@ -1211,9 +1203,9 @@ interface NSFileProviderTestingModification : NSFileProviderTestingOperation {

interface INSFileProviderTestingDeletion { }

[Unavailable (PlatformName.MacCatalyst)]
[NoMacCatalyst]
[NoWatch, NoTV, NoiOS, Mac (11,3)]
[Protocol, Advice ("This API is not available when using UIKit on macOS.")]
[Protocol]
interface NSFileProviderTestingDeletion : NSFileProviderTestingOperation {

[Abstract]
Expand All @@ -1239,9 +1231,9 @@ interface NSFileProviderTestingDeletion : NSFileProviderTestingOperation {

interface INSFileProviderTestingContentFetch { }

[Unavailable (PlatformName.MacCatalyst)]
[NoMacCatalyst]
[NoWatch, NoTV, NoiOS, Mac (11,3)]
[Protocol, Advice ("This API is not available when using UIKit on macOS.")]
[Protocol]
interface NSFileProviderTestingContentFetch : NSFileProviderTestingOperation {

[Abstract]
Expand All @@ -1255,9 +1247,9 @@ interface NSFileProviderTestingContentFetch : NSFileProviderTestingOperation {

interface INSFileProviderTestingChildrenEnumeration { }

[Unavailable (PlatformName.MacCatalyst)]
[NoMacCatalyst]
[NoWatch, NoTV, NoiOS, Mac (11,3)]
[Protocol, Advice ("This API is not available when using UIKit on macOS.")]
[Protocol]
interface NSFileProviderTestingChildrenEnumeration : NSFileProviderTestingOperation {

[Abstract]
Expand All @@ -1271,9 +1263,9 @@ interface NSFileProviderTestingChildrenEnumeration : NSFileProviderTestingOperat

interface INSFileProviderTestingCollisionResolution { }

[Unavailable (PlatformName.MacCatalyst)]
[NoMacCatalyst]
[NoWatch, NoTV, NoiOS, Mac (11,3)]
[Protocol, Advice ("This API is not available when using UIKit on macOS.")]
[Protocol]
interface NSFileProviderTestingCollisionResolution : NSFileProviderTestingOperation {

[Abstract]
Expand Down
6 changes: 2 additions & 4 deletions src/intentsui.cs
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,7 @@ interface INUIAddVoiceShortcutViewController {
[NullAllowed, Export ("delegate", ArgumentSemantic.Weak)]
NSObject WeakDelegate { get; set; }

[Unavailable (PlatformName.MacCatalyst)]
[Advice ("This API is not available when using UIKit on macOS.")]
[NoMacCatalyst]
[Export ("initWithShortcut:")]
IntPtr Constructor (INShortcut shortcut);
}
Expand Down Expand Up @@ -139,8 +138,7 @@ interface INUIEditVoiceShortcutViewController {
[NullAllowed, Export ("delegate", ArgumentSemantic.Weak)]
NSObject WeakDelegate { get; set; }

[Unavailable (PlatformName.MacCatalyst)]
[Advice ("This API is not available when using UIKit on macOS.")]
[NoMacCatalyst]
[Export ("initWithVoiceShortcut:")]
IntPtr Constructor (INVoiceShortcut voiceShortcut);
}
Expand Down
Loading

4 comments on commit ef6793f

@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 failed on Build ❌

Tests failed on Build.

API diff

✅ API Diff from stable

View API diff

API & Generator diff

API Diff (from PR only) (no change)
ℹ️ Generator Diff (please review changes)

Packages generated

View packages

Test results

1 tests failed, 232 tests passed.

Failed tests

  • Documentation/All: Failed

Pipeline on Agent XAMBOT-1025.BigSur'
[src] Use [NoMacCatalyst] everywhere. (#12407)

@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.

❌ Tests failed on macOS M1 - Mac Big Sur (11.5) ❌

Tests failed on M1 - Mac Big Sur (11.5).

Failed tests are:

  • xammac_tests

Pipeline on Agent
[src] Use [NoMacCatalyst] everywhere. (#12407)

@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.

⚠️ Tests were not ran (VSTS: device tests tvOS). ⚠️

Results were skipped for this run due to provisioning problems Azure Devops. Please contact the bot administrator.

Pipeline on Agent
[src] Use [NoMacCatalyst] everywhere. (#12407)

@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.

⚠️ Tests were not ran (VSTS: device tests iOS). ⚠️

Results were skipped for this run due to provisioning problems Azure Devops. Please contact the bot administrator.

Pipeline on Agent
[src] Use [NoMacCatalyst] everywhere. (#12407)

Please sign in to comment.