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

[Intents] Update bindings for Xcode 13.0 betas 1 through 5 #12771

Merged
merged 4 commits into from
Sep 22, 2021
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
67 changes: 67 additions & 0 deletions src/Intents/INPerson.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
using System;
using CoreGraphics;
using Foundation;
using ObjCRuntime;
using System.Runtime.Versioning;

#nullable enable

namespace Intents
{

#if !TVOS
public partial class INPerson
{

#if !NET
[Introduced (PlatformName.iOS, 15,0)]
Copy link
Member

Choose a reason for hiding this comment

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

The indentation is still off for all the attributes in this file (looks like they should be indented one more level).

[Introduced (PlatformName.MacOSX, 12,0)]
[Introduced (PlatformName.WatchOS, 8,0)]
#else
[SupportedOSPlatform ("ios15.0")]
[SupportedOSPlatform ("macos12.0")]
#endif //!NET
public enum INPersonType {
Copy link
Member

Choose a reason for hiding this comment

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

The indentation is off here, and it looks like the indentation is spaces too (when it should be tabs).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ahh thanks for catching!

Me = 0,
ContactSuggestion = 1,
}

#if !NET
[Introduced (PlatformName.iOS, 15,0)]
[Introduced (PlatformName.MacOSX, 12,0)]
[Introduced (PlatformName.WatchOS, 8,0)]
#else
[SupportedOSPlatform ("ios15.0")]
[SupportedOSPlatform ("macos12.0")]
#endif //!NET
public INPerson (INPersonHandle personHandle, NSPersonNameComponents? nameComponents, string? displayName, INImage? image, string? contactIdentifier, string? customIdentifier, bool isMe, INPersonSuggestionType suggestionType) :
this (personHandle, nameComponents, displayName, image, contactIdentifier, customIdentifier, isMe, suggestionType, INPersonType.Me)
{
}

#if !NET
[Introduced (PlatformName.iOS, 15,0)]
[Introduced (PlatformName.MacOSX, 12,0)]
[Introduced (PlatformName.WatchOS, 8,0)]
#else
[SupportedOSPlatform ("ios15.0")]
[SupportedOSPlatform ("macos12.0")]
#endif //!NET
public INPerson (INPersonHandle personHandle, NSPersonNameComponents? nameComponents, string? displayName, INImage? image, string? contactIdentifier, string? customIdentifier, bool isMe, INPersonSuggestionType suggestionType, INPersonType personType) : base (NSObjectFlag.Empty)
{
switch (personType) {
case INPersonType.Me:
InitializeHandle (InitWithMe (personHandle, nameComponents, displayName, image, contactIdentifier, customIdentifier, isMe, suggestionType),
"initWithPersonHandle:nameComponents:displayName:image:contactIdentifier:customIdentifier:isMe:suggestionType:");
break;
case INPersonType.ContactSuggestion:
InitializeHandle (InitWithContactSuggestion (personHandle, nameComponents, displayName, image, contactIdentifier, customIdentifier, isMe, suggestionType),
"initWithPersonHandle:nameComponents:displayName:image:contactIdentifier:customIdentifier:isContactSuggestion:suggestionType:");
break;
default:
throw new ArgumentException (nameof (personType));
}
}
}
#endif // !TVOS
}
2 changes: 1 addition & 1 deletion src/foundation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5420,7 +5420,7 @@ partial interface NSUserActivity

// From NSUserActivity (IntentsAdditions)

[Watch (5,0), NoTV, NoMac, iOS (12,0)]
[Watch (5,0), NoTV, Mac (12,0), iOS (12,0)]
[NullAllowed, Export ("suggestedInvocationPhrase")]
string SuggestedInvocationPhrase {
// This _simply_ ensure that the Intents namespace (via the enum) will be present which,
Expand Down
1 change: 1 addition & 0 deletions src/frameworks.sources
Original file line number Diff line number Diff line change
Expand Up @@ -999,6 +999,7 @@ INTENTS_SOURCES = \
Intents/INMessageAttributeOptionsResolutionResult.cs \
Intents/INMessageAttributeResolutionResult.cs \
Intents/INPaymentStatusResolutionResult.cs \
Intents/INPerson.cs \
Intents/INPriceRange.cs \
Intents/INRadioTypeResolutionResult.cs \
Intents/INRelativeReferenceResolutionResult.cs \
Expand Down
Loading