From cf9a22064396e0814326259bdbd86efe0027d0df Mon Sep 17 00:00:00 2001 From: Manuel de la Pena Date: Thu, 7 Sep 2023 11:34:48 -0400 Subject: [PATCH 1/7] [Foundation] Add support for Xcode 15 beta 7. --- src/Foundation/Enum.cs | 5 + src/foundation.cs | 212 ++++++++++++++++++ .../common-Foundation.ignore | 17 +- .../iOS-Foundation.ignore | 5 +- .../iOS-Foundation.todo | 59 ----- .../macOS-Foundation.ignore | 18 ++ .../macOS-Foundation.todo | 57 ----- .../tvOS-Foundation.ignore | 16 +- .../tvOS-Foundation.todo | 59 ----- tests/xtro-sharpie/common-Foundation.ignore | 11 + tests/xtro-sharpie/iOS-Foundation.ignore | 13 +- tests/xtro-sharpie/iOS-Foundation.todo | 57 ----- tests/xtro-sharpie/macOS-Foundation.ignore | 2 + tests/xtro-sharpie/macOS-Foundation.todo | 51 ----- tests/xtro-sharpie/tvOS-Foundation.ignore | 15 ++ tests/xtro-sharpie/tvOS-Foundation.todo | 56 ----- tests/xtro-sharpie/watchOS-Foundation.ignore | 3 + tests/xtro-sharpie/watchOS-Foundation.todo | 55 ----- 18 files changed, 313 insertions(+), 398 deletions(-) delete mode 100644 tests/xtro-sharpie/api-annotations-dotnet/iOS-Foundation.todo delete mode 100644 tests/xtro-sharpie/api-annotations-dotnet/macOS-Foundation.todo delete mode 100644 tests/xtro-sharpie/api-annotations-dotnet/tvOS-Foundation.todo delete mode 100644 tests/xtro-sharpie/iOS-Foundation.todo delete mode 100644 tests/xtro-sharpie/macOS-Foundation.todo delete mode 100644 tests/xtro-sharpie/tvOS-Foundation.todo delete mode 100644 tests/xtro-sharpie/watchOS-Foundation.todo diff --git a/src/Foundation/Enum.cs b/src/Foundation/Enum.cs index 0f94ada4dbe1..a2be595d37c3 100644 --- a/src/Foundation/Enum.cs +++ b/src/Foundation/Enum.cs @@ -185,6 +185,9 @@ public enum NSNetServicesStatus : long { MissingRequiredConfigurationError = -72008, } +#if XAMCORE_5_0 + [NoWatch] +#endif [Flags] [Native] public enum NSNetServiceOptions : ulong { @@ -279,6 +282,8 @@ public enum NSDataWritingOptions : ulong { [Mac (11, 0)] [MacCatalyst (13, 1)] FileProtectionCompleteUntilFirstUserAuthentication = 0x40000000, + [iOS (17,0), NoMac, MacCatalyst (17,0), TV (17,0), Watch (10,0)] + FileProtectionCompleteWhenUserInactive = 0x50000000, } public delegate void NSSetEnumerator (NSObject obj, ref bool stop); diff --git a/src/foundation.cs b/src/foundation.cs index 467bcd410b64..222367e43212 100644 --- a/src/foundation.cs +++ b/src/foundation.cs @@ -875,8 +875,81 @@ public enum NSAttributedStringNameKey { [Field ("NSReplacementIndexAttributeName")] ReplacementIndex, + + [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [Field ("NSInflectionAgreementArgumentAttributeName")] + InflectionAgreementArgument, + + [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [Field ("NSInflectionAgreementConceptAttributeName")] + InflectionConcept, + + [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [Field ("NSInflectionReferentConceptAttributeName")] + InflectionReferentConceptAttributeName, + + } + + [Watch (10,0), TV (17,0), Mac (14,0), iOS (17,0), MacCatalyst (17,0)] + [Native] + public enum NSGrammaticalCase : long + { + NotSet = 0, + Nominative, + Accusative, + Dative, + Genitive, + Prepositional, + Ablative, + Adessive, + Allative, + Elative, + Illative, + Essive, + Inessive, + Locative, + Translative, + } + + [Watch (10,0), TV (17,0), Mac (14,0), iOS (17,0), MacCatalyst (17,0)] + [Native] + public enum NSGrammaticalPronounType : long + { + NotSet = 0, + Personal, + Reflexive, + Possessive, + } + + [Watch (10,0), TV (17,0), Mac (14,0), iOS (17,0), MacCatalyst (17,0)] + [Native] + public enum NSGrammaticalDefiniteness : long + { + NotSet = 0, + Indefinite, + Definite, + } + + [Watch (10,0), TV (17,0), Mac (14,0), iOS (17,0), MacCatalyst (17,0)] + [Native] + public enum NSGrammaticalDetermination : long + { + NotSet = 0, + Independent, + Dependent, } + [Watch (10,0), TV (17,0), Mac (14,0), iOS (17,0), MacCatalyst (17,0)] + [Native] + public enum NSGrammaticalPerson : long + { + NotSet = 0, + First, + Second, + Third, + } + + [NoWatch] [NoTV] // really inside WebKit [iOS (13, 0)] @@ -4460,6 +4533,10 @@ interface NSError : NSSecureCoding, NSCopying { [Field ("NSNetServicesErrorDomain")] NSString NSNetServicesErrorDomain { get; } + [NoWatch] + [Field ("NSNetServicesErrorCode")] + NSString NSNetServicesErrorCode { get; } + [Field ("NSStreamSocketSSLErrorDomain")] NSString NSStreamSocketSSLErrorDomain { get; } @@ -5233,6 +5310,14 @@ interface NSLocale : NSSecureCoding, NSCopying { [Export ("localizedStringForCalendarIdentifier:")] [return: NullAllowed] string GetLocalizedCalendarIdentifier (string calendarIdentifier); + + [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17,0)] + [Export ("languageIdentifier")] + string LanguageIdentifier { get; } + + [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17,0)] + [NullAllowed, Export ("regionCode")] + string RegionCode { get; } } delegate void NSMatchEnumerator (NSTextCheckingResult result, NSMatchingFlags flags, ref bool stop); @@ -6183,6 +6268,12 @@ partial interface NSUrl : NSSecureCoding, NSCopying [Static] NSUrl _FromStringRelative (string url, NSUrl relative); + [Watch (10,0), TV (17,0), Mac (14,0), iOS (17,0), MacCatalyst (17,0)] + [Static] + [Export ("URLWithString:encodingInvalidCharacters:")] + [return: NullAllowed] + NSUrl FromStringEncoded (string url, bool encodingInvalidCharacters); + [Export ("absoluteString")] [NullAllowed] string AbsoluteString { get; } @@ -6897,6 +6988,14 @@ partial interface NSUrl : NSSecureCoding, NSCopying [Field ("NSURLFileProtectionCompleteUntilFirstUserAuthentication")] NSString FileProtectionCompleteUntilFirstUserAuthentication { get; } + [Watch (10, 0), TV (17, 0), NoMac, iOS (17, 0), MacCatalyst (17, 0)] + [Field ("NSURLFileProtectionCompleteWhenUserInactive")] + NSString FileProtectionCompleteWhenUserInactive { get; } + + [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [Field ("NSURLDirectoryEntryCountKey")] + NSString NSURLDirectoryEntryCountKey { get; } + [Watch (7, 0)] [TV (14, 0)] [Mac (11, 0)] @@ -7096,6 +7195,12 @@ partial interface NSUrlComponents : NSCopying { [Static, Export ("componentsWithString:")] NSUrlComponents FromString (string urlString); + [Watch (10,0), TV (17,0), Mac (14,0), iOS (17,0), MacCatalyst (17,0)] + [Static] + [Export ("componentsWithString:encodingInvalidCharacters:")] + [return: NullAllowed] + NSUrlComponents FromStringEncoded (string url, bool encodingInvalidCharacters); + [Export ("URL")] NSUrl Url { get; } @@ -7743,6 +7848,15 @@ partial interface NSUrlSession { [MacCatalyst (13, 1)] [Export ("webSocketTaskWithRequest:")] NSUrlSessionWebSocketTask CreateWebSocketTask (NSUrlRequest request); + + [Watch (10,0), TV (17,0), Mac (14,0), iOS (17,0), MacCatalyst (17,0)] + [Export ("uploadTaskWithResumeData:")] + NSUrlSessionUploadTask UploadTask (NSData resumeData); + + [Async (ResultTypeName = "NSUrlSessionUploadTaskResumeRequest")] + [Watch (10,0), TV (17,0), Mac (14,0), iOS (17,0), MacCatalyst (17,0)] + [Export ("uploadTaskWithResumeData:completionHandler:")] + NSUrlSessionUploadTask UploadTask (NSData resumeData, Action completionHandler); } [MacCatalyst (13, 1)] @@ -7930,6 +8044,15 @@ partial interface NSUrlSessionUploadTask { [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'NSURLSession.CreateUploadTask' instead.")] [Export ("init")] NativeHandle Constructor (); + + [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [Field ("NSURLSessionUploadTaskResumeData")] + NSString TaskResumeDataKey { get; } + + [Async] + [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [Export ("cancelByProducingResumeData:")] + void CancelByProducingResumeData (Action completionHandler); } [MacCatalyst (13, 1)] @@ -8196,6 +8319,14 @@ partial interface NSUrlSessionTaskDelegate { [MacCatalyst (16, 0)] [Export ("URLSession:didCreateTask:")] void DidCreateTask (NSUrlSession session, NSUrlSessionTask task); + + [Watch (10,0), TV (17,0), Mac (14,0), iOS (17,0), MacCatalyst (17,0)] + [Export ("URLSession:task:didReceiveInformationalResponse:")] + void DidReceiveInformationalResponse (NSUrlSession session, NSUrlSessionTask task, NSHttpUrlResponse response); + + [Watch (10,0), TV (17,0), Mac (14,0), iOS (17,0), MacCatalyst (17,0)] + [Export ("URLSession:task:needNewBodyStreamFromOffset:completionHandler:")] + void NeedNewBodyStreamFromOffset (NSUrlSession session, NSUrlSessionTask task, long offset, Action completionHandler); } [MacCatalyst (13, 1)] @@ -13468,6 +13599,10 @@ partial interface NSFileManager { [Field ("NSFileProtectionCompleteUntilFirstUserAuthentication")] NSString FileProtectionCompleteUntilFirstUserAuthentication { get; } + [Watch (10, 0), TV (17, 0), NoMac, iOS (17, 0), MacCatalyst (17,0)] + [Field ("NSFileProtectionCompleteWhenUserInactive")] + NSString FileProtectionCompleteWhenUserInactive { get; } + [Field ("NSFileSystemSize")] NSString SystemSize { get; } @@ -17874,10 +18009,18 @@ interface NSMorphology : NSCopying, NSSecureCoding { [Export ("number", ArgumentSemantic.Assign)] NSGrammaticalNumber Number { get; set; } + [Obsoleted (PlatformName.MacOSX, 14, 0, message: "Use 'NSTermOfAddress' instead.")] + [Obsoleted (PlatformName.iOS, 17, 0, message: "Use 'NSTermOfAddress' instead.")] + [Obsoleted (PlatformName.TvOS, 17, 0, message: "Use 'NSTermOfAddress' instead.")] + [Obsoleted (PlatformName.WatchOS, 10, 0, message: "Use 'NSTermOfAddress' instead.")] [Export ("customPronounForLanguage:")] [return: NullAllowed] NSMorphologyCustomPronoun GetCustomPronoun (string language); + [Obsoleted (PlatformName.MacOSX, 14, 0, message: "Use 'NSTermOfAddress' instead.")] + [Obsoleted (PlatformName.iOS, 17, 0, message: "Use 'NSTermOfAddress' instead.")] + [Obsoleted (PlatformName.TvOS, 17, 0, message: "Use 'NSTermOfAddress' instead.")] + [Obsoleted (PlatformName.WatchOS, 10, 0, message: "Use 'NSTermOfAddress' instead.")] [Export ("setCustomPronoun:forLanguage:error:")] bool SetCustomPronoun ([NullAllowed] NSMorphologyCustomPronoun features, string language, [NullAllowed] out NSError error); @@ -17887,8 +18030,32 @@ interface NSMorphology : NSCopying, NSSecureCoding { [Static] [Export ("userMorphology")] NSMorphology UserMorphology { get; } + + [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [Export ("grammaticalCase", ArgumentSemantic.Assign)] + NSGrammaticalCase GrammaticalCase { get; set; } + + [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [Export ("determination", ArgumentSemantic.Assign)] + NSGrammaticalDetermination Determination { get; set; } + + [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [Export ("grammaticalPerson", ArgumentSemantic.Assign)] + NSGrammaticalPerson GrammaticalPerson { get; set; } + + [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [Export ("pronounType", ArgumentSemantic.Assign)] + NSGrammaticalPronounType PronounType { get; set; } + + [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [Export ("definiteness", ArgumentSemantic.Assign)] + NSGrammaticalDefiniteness Definiteness { get; set; } } + [Obsoleted (PlatformName.MacOSX, 14, 0, message: "Use 'NSTermOfAddress' instead.")] + [Obsoleted (PlatformName.iOS, 17, 0, message: "Use 'NSTermOfAddress' instead.")] + [Obsoleted (PlatformName.TvOS, 17, 0, message: "Use 'NSTermOfAddress' instead.")] + [Obsoleted (PlatformName.WatchOS, 10, 0, message: "Use 'NSTermOfAddress' instead.")] [Watch (8, 0), TV (15, 0), Mac (12, 0), iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (NSObject))] interface NSMorphologyCustomPronoun : NSCopying, NSSecureCoding { @@ -18033,4 +18200,49 @@ interface NSAttributedStringMarkdownSourcePosition : NSCopying, NSSecureCoding { NSRange RangeInString (string @string); } + [Watch (10,0), TV (17,0), Mac (14,0), iOS (17,0), MacCatalyst (17,0)] + [BaseType (typeof(NSObject))] + [DisableDefaultCtor] + interface NSTermOfAddress : NSCopying, NSSecureCoding + { + [Static] + [Export ("neutral")] + NSTermOfAddress Neutral { get; } + + [Static] + [Export ("feminine")] + NSTermOfAddress Feminine { get; } + + [Static] + [Export ("masculine")] + NSTermOfAddress Masculine { get; } + + [Static] + [Export ("localizedForLanguageIdentifier:withPronouns:")] + NSTermOfAddress GetLocalized (string language, NSMorphologyPronoun[] pronouns); + + [NullAllowed, Export ("languageIdentifier")] + string LanguageIdentifier { get; } + + [NullAllowed, Export ("pronouns", ArgumentSemantic.Copy)] + NSMorphologyPronoun[] Pronouns { get; } + } + + [Watch (10,0), TV (17,0), Mac (14,0), iOS (17,0), MacCatalyst (17,0)] + [BaseType (typeof(NSObject))] + [DisableDefaultCtor] + interface NSMorphologyPronoun : NSCopying, NSSecureCoding + { + [Export ("initWithPronoun:morphology:dependentMorphology:")] + NativeHandle Constructor (string pronoun, NSMorphology morphology, [NullAllowed] NSMorphology dependentMorphology); + + [Export ("pronoun")] + string Pronoun { get; } + + [Export ("morphology", ArgumentSemantic.Copy)] + NSMorphology Morphology { get; } + + [NullAllowed, Export ("dependentMorphology", ArgumentSemantic.Copy)] + NSMorphology DependentMorphology { get; } + } } diff --git a/tests/xtro-sharpie/api-annotations-dotnet/common-Foundation.ignore b/tests/xtro-sharpie/api-annotations-dotnet/common-Foundation.ignore index d1b281f96c30..f32555359223 100644 --- a/tests/xtro-sharpie/api-annotations-dotnet/common-Foundation.ignore +++ b/tests/xtro-sharpie/api-annotations-dotnet/common-Foundation.ignore @@ -211,7 +211,6 @@ !missing-field! NSMallocException not bound !missing-field! NSMaximumKeyValueOperator not bound !missing-field! NSMinimumKeyValueOperator not bound -!missing-field! NSNetServicesErrorCode not bound !missing-field! NSObjectInaccessibleException not bound !missing-field! NSObjectNotAvailableException not bound !missing-field! NSOldStyleException not bound @@ -1351,6 +1350,15 @@ !missing-selector! NSString::initWithValidatedFormat:validFormatSpecifiers:error: not bound !missing-selector! NSString::initWithValidatedFormat:validFormatSpecifiers:locale:arguments:error: not bound !missing-selector! NSString::initWithValidatedFormat:validFormatSpecifiers:locale:error: not bound +!missing-selector! NSAttributedString::initWithFormat:options:locale:context: not bound +!missing-selector! NSAttributedString::initWithFormat:options:locale:context:arguments: not bound +!missing-selector! NSAttributedString::initWithFormat:options:locale: not bound +!missing-selector! NSAttributedString::initWithFormat:options:locale:arguments: not bound +!missing-selector! +NSAttributedString::localizedAttributedStringWithFormat:context: not bound +!missing-selector! +NSAttributedString::localizedAttributedStringWithFormat:options:context: not bound +!missing-selector! +NSAttributedString::localizedAttributedStringWithFormat: not bound +!missing-selector! +NSAttributedString::localizedAttributedStringWithFormat:options: not bound +!missing-selector! NSMutableAttributedString::appendLocalizedFormat: not bound # https://github.com/xamarin/xamarin-macios/issues/15577 !missing-selector! +NSOrderedCollectionChange::changeWithObject:type:index: not bound @@ -1382,3 +1390,10 @@ !missing-selector! NSOrderedSet::orderedSetByApplyingDifference: not bound !missing-type! NSOrderedCollectionChange not bound !missing-type! NSOrderedCollectionDifference not bound + +# we provide a static method instead of the constructor since there are two of them +!missing-selector! NSURL::initWithString:encodingInvalidCharacters: not bound +!missing-selector! NSURLComponents::initWithString:encodingInvalidCharacters: not bound + +# it is used in the selectors that support vargs and thefore cannot be used with out bindings +!missing-field! NSInflectionConceptsKey not bound diff --git a/tests/xtro-sharpie/api-annotations-dotnet/iOS-Foundation.ignore b/tests/xtro-sharpie/api-annotations-dotnet/iOS-Foundation.ignore index 0249fb71fd15..55ad2b153a3b 100644 --- a/tests/xtro-sharpie/api-annotations-dotnet/iOS-Foundation.ignore +++ b/tests/xtro-sharpie/api-annotations-dotnet/iOS-Foundation.ignore @@ -4,4 +4,7 @@ !missing-selector! NSXPCInterface::setInterface:forSelector:argumentIndex:ofReply: not bound ## does not exists in iOS as a type - but some API refers to it (messy) -!unknown-type! NSPortMessage bound \ No newline at end of file +!unknown-type! NSPortMessage bound + +# we provide a static method since we already have a constructor with the same params +!missing-selector! NSURLComponents::initWithString:encodingInvalidCharacters: not bound diff --git a/tests/xtro-sharpie/api-annotations-dotnet/iOS-Foundation.todo b/tests/xtro-sharpie/api-annotations-dotnet/iOS-Foundation.todo deleted file mode 100644 index d71850c4e50b..000000000000 --- a/tests/xtro-sharpie/api-annotations-dotnet/iOS-Foundation.todo +++ /dev/null @@ -1,59 +0,0 @@ -!missing-selector! +NSAttributedString::localizedAttributedStringWithFormat: not bound -!missing-selector! +NSAttributedString::localizedAttributedStringWithFormat:options: not bound -!missing-selector! NSAttributedString::initWithFormat:options:locale: not bound -!missing-selector! NSAttributedString::initWithFormat:options:locale:arguments: not bound -!missing-selector! NSMutableAttributedString::appendLocalizedFormat: not bound -!deprecated-attribute-missing! NSMorphology::customPronounForLanguage: missing a [Deprecated] attribute -!deprecated-attribute-missing! NSMorphology::setCustomPronoun:forLanguage:error: missing a [Deprecated] attribute -!deprecated-attribute-missing! NSMorphologyCustomPronoun missing a [Deprecated] attribute -!missing-enum! NSGrammaticalCase not bound -!missing-enum! NSGrammaticalDefiniteness not bound -!missing-enum! NSGrammaticalDetermination not bound -!missing-enum! NSGrammaticalPerson not bound -!missing-enum! NSGrammaticalPronounType not bound -!missing-enum-value! NSDataWritingOptions native value NSDataWritingFileProtectionCompleteWhenUserInactive = 1342177280 not bound -!missing-field! NSFileProtectionCompleteWhenUserInactive not bound -!missing-field! NSInflectionAgreementArgumentAttributeName not bound -!missing-field! NSInflectionAgreementConceptAttributeName not bound -!missing-field! NSInflectionConceptsKey not bound -!missing-field! NSInflectionReferentConceptAttributeName not bound -!missing-field! NSURLFileProtectionCompleteWhenUserInactive not bound -!missing-field! NSURLSessionUploadTaskResumeData not bound -!missing-protocol-member! NSURLSessionTaskDelegate::URLSession:task:didReceiveInformationalResponse: not found -!missing-protocol-member! NSURLSessionTaskDelegate::URLSession:task:needNewBodyStreamFromOffset:completionHandler: not found -!missing-selector! +NSAttributedString::localizedAttributedStringWithFormat:context: not bound -!missing-selector! +NSAttributedString::localizedAttributedStringWithFormat:options:context: not bound -!missing-selector! +NSTermOfAddress::feminine not bound -!missing-selector! +NSTermOfAddress::localizedForLanguageIdentifier:withPronouns: not bound -!missing-selector! +NSTermOfAddress::masculine not bound -!missing-selector! +NSTermOfAddress::neutral not bound -!missing-selector! +NSURL::URLWithString:encodingInvalidCharacters: not bound -!missing-selector! +NSURLComponents::componentsWithString:encodingInvalidCharacters: not bound -!missing-selector! NSAttributedString::initWithFormat:options:locale:context: not bound -!missing-selector! NSAttributedString::initWithFormat:options:locale:context:arguments: not bound -!missing-selector! NSLocale::languageIdentifier not bound -!missing-selector! NSLocale::regionCode not bound -!missing-selector! NSMorphology::definiteness not bound -!missing-selector! NSMorphology::determination not bound -!missing-selector! NSMorphology::grammaticalCase not bound -!missing-selector! NSMorphology::grammaticalPerson not bound -!missing-selector! NSMorphology::pronounType not bound -!missing-selector! NSMorphology::setDefiniteness: not bound -!missing-selector! NSMorphology::setDetermination: not bound -!missing-selector! NSMorphology::setGrammaticalCase: not bound -!missing-selector! NSMorphology::setGrammaticalPerson: not bound -!missing-selector! NSMorphology::setPronounType: not bound -!missing-selector! NSMorphologyPronoun::dependentMorphology not bound -!missing-selector! NSMorphologyPronoun::initWithPronoun:morphology:dependentMorphology: not bound -!missing-selector! NSMorphologyPronoun::morphology not bound -!missing-selector! NSMorphologyPronoun::pronoun not bound -!missing-selector! NSTermOfAddress::languageIdentifier not bound -!missing-selector! NSTermOfAddress::pronouns not bound -!missing-selector! NSURL::initWithString:encodingInvalidCharacters: not bound -!missing-selector! NSURLComponents::initWithString:encodingInvalidCharacters: not bound -!missing-selector! NSURLSession::uploadTaskWithResumeData: not bound -!missing-selector! NSURLSession::uploadTaskWithResumeData:completionHandler: not bound -!missing-selector! NSURLSessionUploadTask::cancelByProducingResumeData: not bound -!missing-type! NSMorphologyPronoun not bound -!missing-type! NSTermOfAddress not bound -!missing-field! NSURLDirectoryEntryCountKey not bound diff --git a/tests/xtro-sharpie/api-annotations-dotnet/macOS-Foundation.ignore b/tests/xtro-sharpie/api-annotations-dotnet/macOS-Foundation.ignore index a78f1ca09f2a..3e6358341432 100644 --- a/tests/xtro-sharpie/api-annotations-dotnet/macOS-Foundation.ignore +++ b/tests/xtro-sharpie/api-annotations-dotnet/macOS-Foundation.ignore @@ -106,6 +106,7 @@ !missing-selector! +NSValue::valueWithEdgeInsets: not bound !missing-selector! +NSXMLDocument::replacementClassForClass: not bound !missing-selector! +NSXMLDTD::predefinedEntityDeclarationForName: not bound +!missing-selector! NSXMLNode::init not bound !missing-selector! +NSXMLNode::attributeWithName:stringValue: not bound !missing-selector! +NSXMLNode::attributeWithName:URI:stringValue: not bound !missing-selector! +NSXMLNode::commentWithStringValue: not bound @@ -566,3 +567,20 @@ !missing-selector! NSXMLDTD::init not bound !missing-selector! NSXMLDTDNode::init not bound !missing-selector! NSXMLNode::detach not bound + +# we cannot deal with vargs +!missing-selector! +NSAttributedString::localizedAttributedStringWithFormat:context: not bound +!missing-selector! +NSAttributedString::localizedAttributedStringWithFormat:options:context: not bound +!missing-selector! NSAttributedString::initWithFormat:options:locale:context: not bound +!missing-selector! NSAttributedString::initWithFormat:options:locale:context:arguments: not bound + +# we already expose static methods and we do not need the construtors +!missing-selector! NSURL::initWithString:encodingInvalidCharacters: not bound +!missing-selector! NSURLComponents::initWithString:encodingInvalidCharacters: not bound + +# use with the vargs api and therefore no needed +!missing-field! NSInflectionConceptsKey not bound + +## these are implemented in a way that xtro doesn't see +!missing-selector! NSAppleEventDescriptor::initListDescriptor not bound +!missing-selector! NSAppleEventDescriptor::initRecordDescriptor not bound diff --git a/tests/xtro-sharpie/api-annotations-dotnet/macOS-Foundation.todo b/tests/xtro-sharpie/api-annotations-dotnet/macOS-Foundation.todo deleted file mode 100644 index 9b09d8b4d1f2..000000000000 --- a/tests/xtro-sharpie/api-annotations-dotnet/macOS-Foundation.todo +++ /dev/null @@ -1,57 +0,0 @@ -!missing-selector! +NSAttributedString::localizedAttributedStringWithFormat: not bound -!missing-selector! +NSAttributedString::localizedAttributedStringWithFormat:options: not bound -!missing-selector! NSAttributedString::initWithFormat:options:locale: not bound -!missing-selector! NSAttributedString::initWithFormat:options:locale:arguments: not bound -!missing-selector! NSMutableAttributedString::appendLocalizedFormat: not bound -!missing-selector! NSAppleEventDescriptor::initListDescriptor not bound -!missing-selector! NSAppleEventDescriptor::initRecordDescriptor not bound -!missing-selector! NSXMLNode::init not bound -!missing-enum! NSGrammaticalCase not bound -!missing-enum! NSGrammaticalDefiniteness not bound -!missing-enum! NSGrammaticalDetermination not bound -!missing-enum! NSGrammaticalPerson not bound -!missing-enum! NSGrammaticalPronounType not bound -!missing-enum-value! NSDataWritingOptions native value NSDataWritingFileProtectionCompleteWhenUserInactive = 1342177280 not bound -!missing-field! NSInflectionAgreementArgumentAttributeName not bound -!missing-field! NSInflectionAgreementConceptAttributeName not bound -!missing-field! NSInflectionConceptsKey not bound -!missing-field! NSInflectionReferentConceptAttributeName not bound -!missing-field! NSURLSessionUploadTaskResumeData not bound -!missing-protocol-member! NSURLSessionTaskDelegate::URLSession:task:didReceiveInformationalResponse: not found -!missing-protocol-member! NSURLSessionTaskDelegate::URLSession:task:needNewBodyStreamFromOffset:completionHandler: not found -!missing-selector! +NSAttributedString::localizedAttributedStringWithFormat:context: not bound -!missing-selector! +NSAttributedString::localizedAttributedStringWithFormat:options:context: not bound -!missing-selector! +NSTermOfAddress::feminine not bound -!missing-selector! +NSTermOfAddress::localizedForLanguageIdentifier:withPronouns: not bound -!missing-selector! +NSTermOfAddress::masculine not bound -!missing-selector! +NSTermOfAddress::neutral not bound -!missing-selector! +NSURL::URLWithString:encodingInvalidCharacters: not bound -!missing-selector! +NSURLComponents::componentsWithString:encodingInvalidCharacters: not bound -!missing-selector! NSAttributedString::initWithFormat:options:locale:context: not bound -!missing-selector! NSAttributedString::initWithFormat:options:locale:context:arguments: not bound -!missing-selector! NSLocale::languageIdentifier not bound -!missing-selector! NSLocale::regionCode not bound -!missing-selector! NSMorphology::definiteness not bound -!missing-selector! NSMorphology::determination not bound -!missing-selector! NSMorphology::grammaticalCase not bound -!missing-selector! NSMorphology::grammaticalPerson not bound -!missing-selector! NSMorphology::pronounType not bound -!missing-selector! NSMorphology::setDefiniteness: not bound -!missing-selector! NSMorphology::setDetermination: not bound -!missing-selector! NSMorphology::setGrammaticalCase: not bound -!missing-selector! NSMorphology::setGrammaticalPerson: not bound -!missing-selector! NSMorphology::setPronounType: not bound -!missing-selector! NSMorphologyPronoun::dependentMorphology not bound -!missing-selector! NSMorphologyPronoun::initWithPronoun:morphology:dependentMorphology: not bound -!missing-selector! NSMorphologyPronoun::morphology not bound -!missing-selector! NSMorphologyPronoun::pronoun not bound -!missing-selector! NSTermOfAddress::languageIdentifier not bound -!missing-selector! NSTermOfAddress::pronouns not bound -!missing-selector! NSURL::initWithString:encodingInvalidCharacters: not bound -!missing-selector! NSURLComponents::initWithString:encodingInvalidCharacters: not bound -!missing-selector! NSURLSession::uploadTaskWithResumeData: not bound -!missing-selector! NSURLSession::uploadTaskWithResumeData:completionHandler: not bound -!missing-selector! NSURLSessionUploadTask::cancelByProducingResumeData: not bound -!missing-type! NSMorphologyPronoun not bound -!missing-type! NSTermOfAddress not bound -!missing-field! NSURLDirectoryEntryCountKey not bound diff --git a/tests/xtro-sharpie/api-annotations-dotnet/tvOS-Foundation.ignore b/tests/xtro-sharpie/api-annotations-dotnet/tvOS-Foundation.ignore index cb5662cbdf50..58bac1f55b90 100644 --- a/tests/xtro-sharpie/api-annotations-dotnet/tvOS-Foundation.ignore +++ b/tests/xtro-sharpie/api-annotations-dotnet/tvOS-Foundation.ignore @@ -11,4 +11,18 @@ !missing-protocol-conformance! NSXPCConnection should conform to NSXPCProxyCreating !missing-selector! NSXPCInterface::interfaceForSelector:argumentIndex:ofReply: not bound -!missing-selector! NSXPCInterface::setInterface:forSelector:argumentIndex:ofReply: not bound \ No newline at end of file +!missing-selector! NSXPCInterface::setInterface:forSelector:argumentIndex:ofReply: not bound + +# we cannot deal with vargs +!missing-selector! +NSAttributedString::localizedAttributedStringWithFormat:context: not bound +!missing-selector! +NSAttributedString::localizedAttributedStringWithFormat:options:context: not bound +!missing-selector! NSAttributedString::initWithFormat:options:locale:context: not bound +!missing-selector! NSAttributedString::initWithFormat:options:locale:context:arguments: not bound + +# we already expose static methods and we do not need the construtors +!missing-selector! NSURL::initWithString:encodingInvalidCharacters: not bound +!missing-selector! NSURLComponents::initWithString:encodingInvalidCharacters: not bound + +# use with the vargs api and therefore no needed +!missing-field! NSInflectionConceptsKey not bound + diff --git a/tests/xtro-sharpie/api-annotations-dotnet/tvOS-Foundation.todo b/tests/xtro-sharpie/api-annotations-dotnet/tvOS-Foundation.todo deleted file mode 100644 index d71850c4e50b..000000000000 --- a/tests/xtro-sharpie/api-annotations-dotnet/tvOS-Foundation.todo +++ /dev/null @@ -1,59 +0,0 @@ -!missing-selector! +NSAttributedString::localizedAttributedStringWithFormat: not bound -!missing-selector! +NSAttributedString::localizedAttributedStringWithFormat:options: not bound -!missing-selector! NSAttributedString::initWithFormat:options:locale: not bound -!missing-selector! NSAttributedString::initWithFormat:options:locale:arguments: not bound -!missing-selector! NSMutableAttributedString::appendLocalizedFormat: not bound -!deprecated-attribute-missing! NSMorphology::customPronounForLanguage: missing a [Deprecated] attribute -!deprecated-attribute-missing! NSMorphology::setCustomPronoun:forLanguage:error: missing a [Deprecated] attribute -!deprecated-attribute-missing! NSMorphologyCustomPronoun missing a [Deprecated] attribute -!missing-enum! NSGrammaticalCase not bound -!missing-enum! NSGrammaticalDefiniteness not bound -!missing-enum! NSGrammaticalDetermination not bound -!missing-enum! NSGrammaticalPerson not bound -!missing-enum! NSGrammaticalPronounType not bound -!missing-enum-value! NSDataWritingOptions native value NSDataWritingFileProtectionCompleteWhenUserInactive = 1342177280 not bound -!missing-field! NSFileProtectionCompleteWhenUserInactive not bound -!missing-field! NSInflectionAgreementArgumentAttributeName not bound -!missing-field! NSInflectionAgreementConceptAttributeName not bound -!missing-field! NSInflectionConceptsKey not bound -!missing-field! NSInflectionReferentConceptAttributeName not bound -!missing-field! NSURLFileProtectionCompleteWhenUserInactive not bound -!missing-field! NSURLSessionUploadTaskResumeData not bound -!missing-protocol-member! NSURLSessionTaskDelegate::URLSession:task:didReceiveInformationalResponse: not found -!missing-protocol-member! NSURLSessionTaskDelegate::URLSession:task:needNewBodyStreamFromOffset:completionHandler: not found -!missing-selector! +NSAttributedString::localizedAttributedStringWithFormat:context: not bound -!missing-selector! +NSAttributedString::localizedAttributedStringWithFormat:options:context: not bound -!missing-selector! +NSTermOfAddress::feminine not bound -!missing-selector! +NSTermOfAddress::localizedForLanguageIdentifier:withPronouns: not bound -!missing-selector! +NSTermOfAddress::masculine not bound -!missing-selector! +NSTermOfAddress::neutral not bound -!missing-selector! +NSURL::URLWithString:encodingInvalidCharacters: not bound -!missing-selector! +NSURLComponents::componentsWithString:encodingInvalidCharacters: not bound -!missing-selector! NSAttributedString::initWithFormat:options:locale:context: not bound -!missing-selector! NSAttributedString::initWithFormat:options:locale:context:arguments: not bound -!missing-selector! NSLocale::languageIdentifier not bound -!missing-selector! NSLocale::regionCode not bound -!missing-selector! NSMorphology::definiteness not bound -!missing-selector! NSMorphology::determination not bound -!missing-selector! NSMorphology::grammaticalCase not bound -!missing-selector! NSMorphology::grammaticalPerson not bound -!missing-selector! NSMorphology::pronounType not bound -!missing-selector! NSMorphology::setDefiniteness: not bound -!missing-selector! NSMorphology::setDetermination: not bound -!missing-selector! NSMorphology::setGrammaticalCase: not bound -!missing-selector! NSMorphology::setGrammaticalPerson: not bound -!missing-selector! NSMorphology::setPronounType: not bound -!missing-selector! NSMorphologyPronoun::dependentMorphology not bound -!missing-selector! NSMorphologyPronoun::initWithPronoun:morphology:dependentMorphology: not bound -!missing-selector! NSMorphologyPronoun::morphology not bound -!missing-selector! NSMorphologyPronoun::pronoun not bound -!missing-selector! NSTermOfAddress::languageIdentifier not bound -!missing-selector! NSTermOfAddress::pronouns not bound -!missing-selector! NSURL::initWithString:encodingInvalidCharacters: not bound -!missing-selector! NSURLComponents::initWithString:encodingInvalidCharacters: not bound -!missing-selector! NSURLSession::uploadTaskWithResumeData: not bound -!missing-selector! NSURLSession::uploadTaskWithResumeData:completionHandler: not bound -!missing-selector! NSURLSessionUploadTask::cancelByProducingResumeData: not bound -!missing-type! NSMorphologyPronoun not bound -!missing-type! NSTermOfAddress not bound -!missing-field! NSURLDirectoryEntryCountKey not bound diff --git a/tests/xtro-sharpie/common-Foundation.ignore b/tests/xtro-sharpie/common-Foundation.ignore index 4e66a92ad919..6163f91660ce 100644 --- a/tests/xtro-sharpie/common-Foundation.ignore +++ b/tests/xtro-sharpie/common-Foundation.ignore @@ -1350,6 +1350,10 @@ !missing-selector! +NSAttributedString::localizedAttributedStringWithFormat: not bound !missing-selector! +NSAttributedString::localizedAttributedStringWithFormat:options: not bound !missing-selector! NSMutableAttributedString::appendLocalizedFormat: not bound +!missing-selector! NSAttributedString::initWithFormat:options:locale:context: not bound +!missing-selector! NSAttributedString::initWithFormat:options:locale:context:arguments: not bound +!missing-selector! +NSAttributedString::localizedAttributedStringWithFormat:context: not bound +!missing-selector! +NSAttributedString::localizedAttributedStringWithFormat:options:context: not bound # ignore because we did not add nullallowed but are using ref # https://github.com/xamarin/xamarin-macios/issues/15577 @@ -1397,3 +1401,10 @@ !missing-selector! NSOrderedSet::orderedSetByApplyingDifference: not bound !missing-type! NSOrderedCollectionChange not bound !missing-type! NSOrderedCollectionDifference not bound + +# we provide a static method instead of the constructor since there are two of them +!missing-selector! NSURL::initWithString:encodingInvalidCharacters: not bound +!missing-selector! NSURLComponents::initWithString:encodingInvalidCharacters: not bound + +# it is used in the selectors that support vargs and thefore cannot be used with out bindings +!missing-field! NSInflectionConceptsKey not bound diff --git a/tests/xtro-sharpie/iOS-Foundation.ignore b/tests/xtro-sharpie/iOS-Foundation.ignore index 8015bfa6eb8d..19f000fc03a1 100644 --- a/tests/xtro-sharpie/iOS-Foundation.ignore +++ b/tests/xtro-sharpie/iOS-Foundation.ignore @@ -1,5 +1,16 @@ - !missing-protocol-conformance! NSXPCConnection should conform to NSXPCProxyCreating !missing-selector! NSXPCInterface::interfaceForSelector:argumentIndex:ofReply: not bound !missing-selector! NSXPCInterface::setInterface:forSelector:argumentIndex:ofReply: not bound !missing-enum! NSNetServicesError not bound + +# Apple started refusing applications that use those selectors (desk #63237) +# The situation is a bit confusing since NSPortMessage.h is not part of iOS SDK - +# but the type is used (from NSPort[Delegate]) but not _itself_ documented +# The selectors Apple *currently* dislike are removed from the iOS build +!unknown-type! NSPortMessage bound + +# we provide a static method since we already have a constructor with the same params +!missing-selector! NSURLComponents::initWithString:encodingInvalidCharacters: not bound + +# We will not remove it for classic, was removed for dotnet +!unknown-native-enum! NSBundleExecutableArchitecture bound diff --git a/tests/xtro-sharpie/iOS-Foundation.todo b/tests/xtro-sharpie/iOS-Foundation.todo deleted file mode 100644 index 6c36069c6f92..000000000000 --- a/tests/xtro-sharpie/iOS-Foundation.todo +++ /dev/null @@ -1,57 +0,0 @@ -!missing-field! NSNetServicesErrorCode not bound -!unknown-native-enum! NSBundleExecutableArchitecture bound -!unknown-type! NSPortMessage bound -!deprecated-attribute-missing! NSMorphology::customPronounForLanguage: missing a [Deprecated] attribute -!deprecated-attribute-missing! NSMorphology::setCustomPronoun:forLanguage:error: missing a [Deprecated] attribute -!deprecated-attribute-missing! NSMorphologyCustomPronoun missing a [Deprecated] attribute -!missing-enum! NSGrammaticalCase not bound -!missing-enum! NSGrammaticalDefiniteness not bound -!missing-enum! NSGrammaticalDetermination not bound -!missing-enum! NSGrammaticalPerson not bound -!missing-enum! NSGrammaticalPronounType not bound -!missing-enum-value! NSDataWritingOptions native value NSDataWritingFileProtectionCompleteWhenUserInactive = 1342177280 not bound -!missing-field! NSFileProtectionCompleteWhenUserInactive not bound -!missing-field! NSInflectionAgreementArgumentAttributeName not bound -!missing-field! NSInflectionAgreementConceptAttributeName not bound -!missing-field! NSInflectionConceptsKey not bound -!missing-field! NSInflectionReferentConceptAttributeName not bound -!missing-field! NSURLFileProtectionCompleteWhenUserInactive not bound -!missing-field! NSURLSessionUploadTaskResumeData not bound -!missing-protocol-member! NSURLSessionTaskDelegate::URLSession:task:didReceiveInformationalResponse: not found -!missing-protocol-member! NSURLSessionTaskDelegate::URLSession:task:needNewBodyStreamFromOffset:completionHandler: not found -!missing-selector! +NSAttributedString::localizedAttributedStringWithFormat:context: not bound -!missing-selector! +NSAttributedString::localizedAttributedStringWithFormat:options:context: not bound -!missing-selector! +NSTermOfAddress::feminine not bound -!missing-selector! +NSTermOfAddress::localizedForLanguageIdentifier:withPronouns: not bound -!missing-selector! +NSTermOfAddress::masculine not bound -!missing-selector! +NSTermOfAddress::neutral not bound -!missing-selector! +NSURL::URLWithString:encodingInvalidCharacters: not bound -!missing-selector! +NSURLComponents::componentsWithString:encodingInvalidCharacters: not bound -!missing-selector! NSAttributedString::initWithFormat:options:locale:context: not bound -!missing-selector! NSAttributedString::initWithFormat:options:locale:context:arguments: not bound -!missing-selector! NSLocale::languageIdentifier not bound -!missing-selector! NSLocale::regionCode not bound -!missing-selector! NSMorphology::definiteness not bound -!missing-selector! NSMorphology::determination not bound -!missing-selector! NSMorphology::grammaticalCase not bound -!missing-selector! NSMorphology::grammaticalPerson not bound -!missing-selector! NSMorphology::pronounType not bound -!missing-selector! NSMorphology::setDefiniteness: not bound -!missing-selector! NSMorphology::setDetermination: not bound -!missing-selector! NSMorphology::setGrammaticalCase: not bound -!missing-selector! NSMorphology::setGrammaticalPerson: not bound -!missing-selector! NSMorphology::setPronounType: not bound -!missing-selector! NSMorphologyPronoun::dependentMorphology not bound -!missing-selector! NSMorphologyPronoun::initWithPronoun:morphology:dependentMorphology: not bound -!missing-selector! NSMorphologyPronoun::morphology not bound -!missing-selector! NSMorphologyPronoun::pronoun not bound -!missing-selector! NSTermOfAddress::languageIdentifier not bound -!missing-selector! NSTermOfAddress::pronouns not bound -!missing-selector! NSURL::initWithString:encodingInvalidCharacters: not bound -!missing-selector! NSURLComponents::initWithString:encodingInvalidCharacters: not bound -!missing-selector! NSURLSession::uploadTaskWithResumeData: not bound -!missing-selector! NSURLSession::uploadTaskWithResumeData:completionHandler: not bound -!missing-selector! NSURLSessionUploadTask::cancelByProducingResumeData: not bound -!missing-type! NSMorphologyPronoun not bound -!missing-type! NSTermOfAddress not bound -!missing-field! NSURLDirectoryEntryCountKey not bound diff --git a/tests/xtro-sharpie/macOS-Foundation.ignore b/tests/xtro-sharpie/macOS-Foundation.ignore index 2a385395f554..752b0fa80398 100644 --- a/tests/xtro-sharpie/macOS-Foundation.ignore +++ b/tests/xtro-sharpie/macOS-Foundation.ignore @@ -576,3 +576,5 @@ !missing-selector! NSXMLNode::detach not bound !missing-selector! NSXMLNode::init not bound !missing-enum! NSNetServicesError not bound + +!unknown-native-enum! NSBundleExecutableArchitecture bound diff --git a/tests/xtro-sharpie/macOS-Foundation.todo b/tests/xtro-sharpie/macOS-Foundation.todo deleted file mode 100644 index 228b83d74aed..000000000000 --- a/tests/xtro-sharpie/macOS-Foundation.todo +++ /dev/null @@ -1,51 +0,0 @@ -!missing-field! NSNetServicesErrorCode not bound -!unknown-native-enum! NSBundleExecutableArchitecture bound -!missing-enum! NSGrammaticalCase not bound -!missing-enum! NSGrammaticalDefiniteness not bound -!missing-enum! NSGrammaticalDetermination not bound -!missing-enum! NSGrammaticalPerson not bound -!missing-enum! NSGrammaticalPronounType not bound -!missing-enum-value! NSDataWritingOptions native value NSDataWritingFileProtectionCompleteWhenUserInactive = 1342177280 not bound -!missing-field! NSInflectionAgreementArgumentAttributeName not bound -!missing-field! NSInflectionAgreementConceptAttributeName not bound -!missing-field! NSInflectionConceptsKey not bound -!missing-field! NSInflectionReferentConceptAttributeName not bound -!missing-field! NSURLSessionUploadTaskResumeData not bound -!missing-protocol-member! NSURLSessionTaskDelegate::URLSession:task:didReceiveInformationalResponse: not found -!missing-protocol-member! NSURLSessionTaskDelegate::URLSession:task:needNewBodyStreamFromOffset:completionHandler: not found -!missing-selector! +NSAttributedString::localizedAttributedStringWithFormat:context: not bound -!missing-selector! +NSAttributedString::localizedAttributedStringWithFormat:options:context: not bound -!missing-selector! +NSTermOfAddress::feminine not bound -!missing-selector! +NSTermOfAddress::localizedForLanguageIdentifier:withPronouns: not bound -!missing-selector! +NSTermOfAddress::masculine not bound -!missing-selector! +NSTermOfAddress::neutral not bound -!missing-selector! +NSURL::URLWithString:encodingInvalidCharacters: not bound -!missing-selector! +NSURLComponents::componentsWithString:encodingInvalidCharacters: not bound -!missing-selector! NSAttributedString::initWithFormat:options:locale:context: not bound -!missing-selector! NSAttributedString::initWithFormat:options:locale:context:arguments: not bound -!missing-selector! NSLocale::languageIdentifier not bound -!missing-selector! NSLocale::regionCode not bound -!missing-selector! NSMorphology::definiteness not bound -!missing-selector! NSMorphology::determination not bound -!missing-selector! NSMorphology::grammaticalCase not bound -!missing-selector! NSMorphology::grammaticalPerson not bound -!missing-selector! NSMorphology::pronounType not bound -!missing-selector! NSMorphology::setDefiniteness: not bound -!missing-selector! NSMorphology::setDetermination: not bound -!missing-selector! NSMorphology::setGrammaticalCase: not bound -!missing-selector! NSMorphology::setGrammaticalPerson: not bound -!missing-selector! NSMorphology::setPronounType: not bound -!missing-selector! NSMorphologyPronoun::dependentMorphology not bound -!missing-selector! NSMorphologyPronoun::initWithPronoun:morphology:dependentMorphology: not bound -!missing-selector! NSMorphologyPronoun::morphology not bound -!missing-selector! NSMorphologyPronoun::pronoun not bound -!missing-selector! NSTermOfAddress::languageIdentifier not bound -!missing-selector! NSTermOfAddress::pronouns not bound -!missing-selector! NSURL::initWithString:encodingInvalidCharacters: not bound -!missing-selector! NSURLComponents::initWithString:encodingInvalidCharacters: not bound -!missing-selector! NSURLSession::uploadTaskWithResumeData: not bound -!missing-selector! NSURLSession::uploadTaskWithResumeData:completionHandler: not bound -!missing-selector! NSURLSessionUploadTask::cancelByProducingResumeData: not bound -!missing-type! NSMorphologyPronoun not bound -!missing-type! NSTermOfAddress not bound -!missing-field! NSURLDirectoryEntryCountKey not bound diff --git a/tests/xtro-sharpie/tvOS-Foundation.ignore b/tests/xtro-sharpie/tvOS-Foundation.ignore index bf8413a30c92..059452ba09e3 100644 --- a/tests/xtro-sharpie/tvOS-Foundation.ignore +++ b/tests/xtro-sharpie/tvOS-Foundation.ignore @@ -13,3 +13,18 @@ !missing-selector! NSXPCInterface::interfaceForSelector:argumentIndex:ofReply: not bound !missing-selector! NSXPCInterface::setInterface:forSelector:argumentIndex:ofReply: not bound !missing-enum! NSNetServicesError not bound + +# we cannot deal with vargs +!missing-selector! +NSAttributedString::localizedAttributedStringWithFormat:context: not bound +!missing-selector! +NSAttributedString::localizedAttributedStringWithFormat:options:context: not bound +!missing-selector! NSAttributedString::initWithFormat:options:locale:context: not bound +!missing-selector! NSAttributedString::initWithFormat:options:locale:context:arguments: not bound + +# we already expose static methods and we do not need the construtors +!missing-selector! NSURL::initWithString:encodingInvalidCharacters: not bound +!missing-selector! NSURLComponents::initWithString:encodingInvalidCharacters: not bound + +# use with the vargs api and therefore no needed +!missing-field! NSInflectionConceptsKey not bound + +!missing-selector! NSURLSession::getTasksWithCompletionHandler: not bound diff --git a/tests/xtro-sharpie/tvOS-Foundation.todo b/tests/xtro-sharpie/tvOS-Foundation.todo deleted file mode 100644 index 8fde4cc1a881..000000000000 --- a/tests/xtro-sharpie/tvOS-Foundation.todo +++ /dev/null @@ -1,56 +0,0 @@ -!missing-field! NSNetServicesErrorCode not bound -!missing-selector! NSURLSession::getTasksWithCompletionHandler: not bound -!deprecated-attribute-missing! NSMorphology::customPronounForLanguage: missing a [Deprecated] attribute -!deprecated-attribute-missing! NSMorphology::setCustomPronoun:forLanguage:error: missing a [Deprecated] attribute -!deprecated-attribute-missing! NSMorphologyCustomPronoun missing a [Deprecated] attribute -!missing-enum! NSGrammaticalCase not bound -!missing-enum! NSGrammaticalDefiniteness not bound -!missing-enum! NSGrammaticalDetermination not bound -!missing-enum! NSGrammaticalPerson not bound -!missing-enum! NSGrammaticalPronounType not bound -!missing-enum-value! NSDataWritingOptions native value NSDataWritingFileProtectionCompleteWhenUserInactive = 1342177280 not bound -!missing-field! NSFileProtectionCompleteWhenUserInactive not bound -!missing-field! NSInflectionAgreementArgumentAttributeName not bound -!missing-field! NSInflectionAgreementConceptAttributeName not bound -!missing-field! NSInflectionConceptsKey not bound -!missing-field! NSInflectionReferentConceptAttributeName not bound -!missing-field! NSURLFileProtectionCompleteWhenUserInactive not bound -!missing-field! NSURLSessionUploadTaskResumeData not bound -!missing-protocol-member! NSURLSessionTaskDelegate::URLSession:task:didReceiveInformationalResponse: not found -!missing-protocol-member! NSURLSessionTaskDelegate::URLSession:task:needNewBodyStreamFromOffset:completionHandler: not found -!missing-selector! +NSAttributedString::localizedAttributedStringWithFormat:context: not bound -!missing-selector! +NSAttributedString::localizedAttributedStringWithFormat:options:context: not bound -!missing-selector! +NSTermOfAddress::feminine not bound -!missing-selector! +NSTermOfAddress::localizedForLanguageIdentifier:withPronouns: not bound -!missing-selector! +NSTermOfAddress::masculine not bound -!missing-selector! +NSTermOfAddress::neutral not bound -!missing-selector! +NSURL::URLWithString:encodingInvalidCharacters: not bound -!missing-selector! +NSURLComponents::componentsWithString:encodingInvalidCharacters: not bound -!missing-selector! NSAttributedString::initWithFormat:options:locale:context: not bound -!missing-selector! NSAttributedString::initWithFormat:options:locale:context:arguments: not bound -!missing-selector! NSLocale::languageIdentifier not bound -!missing-selector! NSLocale::regionCode not bound -!missing-selector! NSMorphology::definiteness not bound -!missing-selector! NSMorphology::determination not bound -!missing-selector! NSMorphology::grammaticalCase not bound -!missing-selector! NSMorphology::grammaticalPerson not bound -!missing-selector! NSMorphology::pronounType not bound -!missing-selector! NSMorphology::setDefiniteness: not bound -!missing-selector! NSMorphology::setDetermination: not bound -!missing-selector! NSMorphology::setGrammaticalCase: not bound -!missing-selector! NSMorphology::setGrammaticalPerson: not bound -!missing-selector! NSMorphology::setPronounType: not bound -!missing-selector! NSMorphologyPronoun::dependentMorphology not bound -!missing-selector! NSMorphologyPronoun::initWithPronoun:morphology:dependentMorphology: not bound -!missing-selector! NSMorphologyPronoun::morphology not bound -!missing-selector! NSMorphologyPronoun::pronoun not bound -!missing-selector! NSTermOfAddress::languageIdentifier not bound -!missing-selector! NSTermOfAddress::pronouns not bound -!missing-selector! NSURL::initWithString:encodingInvalidCharacters: not bound -!missing-selector! NSURLComponents::initWithString:encodingInvalidCharacters: not bound -!missing-selector! NSURLSession::uploadTaskWithResumeData: not bound -!missing-selector! NSURLSession::uploadTaskWithResumeData:completionHandler: not bound -!missing-selector! NSURLSessionUploadTask::cancelByProducingResumeData: not bound -!missing-type! NSMorphologyPronoun not bound -!missing-type! NSTermOfAddress not bound -!missing-field! NSURLDirectoryEntryCountKey not bound diff --git a/tests/xtro-sharpie/watchOS-Foundation.ignore b/tests/xtro-sharpie/watchOS-Foundation.ignore index c04a97cb7536..7e073c59fe0d 100644 --- a/tests/xtro-sharpie/watchOS-Foundation.ignore +++ b/tests/xtro-sharpie/watchOS-Foundation.ignore @@ -12,3 +12,6 @@ # Initial result from new rule missing-null-allowed !missing-null-allowed! 'Foundation.NSExpression Foundation.NSExpression::FromFunction(Foundation.NSExpressionCallbackHandler,Foundation.NSExpression[])' is missing an [NullAllowed] on parameter #1 !missing-selector! NSURLSession::getTasksWithCompletionHandler: not bound + +# was removed, we leave it until XAMCORE_5_0 +!unknown-native-enum! NSNetServiceOptions bound diff --git a/tests/xtro-sharpie/watchOS-Foundation.todo b/tests/xtro-sharpie/watchOS-Foundation.todo deleted file mode 100644 index d845060da71a..000000000000 --- a/tests/xtro-sharpie/watchOS-Foundation.todo +++ /dev/null @@ -1,55 +0,0 @@ -!deprecated-attribute-missing! NSMorphology::customPronounForLanguage: missing a [Deprecated] attribute -!deprecated-attribute-missing! NSMorphology::setCustomPronoun:forLanguage:error: missing a [Deprecated] attribute -!deprecated-attribute-missing! NSMorphologyCustomPronoun missing a [Deprecated] attribute -!missing-enum! NSGrammaticalCase not bound -!missing-enum! NSGrammaticalDefiniteness not bound -!missing-enum! NSGrammaticalDetermination not bound -!missing-enum! NSGrammaticalPerson not bound -!missing-enum! NSGrammaticalPronounType not bound -!missing-enum-value! NSDataWritingOptions native value NSDataWritingFileProtectionCompleteWhenUserInactive = 1342177280 not bound -!missing-field! NSFileProtectionCompleteWhenUserInactive not bound -!missing-field! NSInflectionAgreementArgumentAttributeName not bound -!missing-field! NSInflectionAgreementConceptAttributeName not bound -!missing-field! NSInflectionConceptsKey not bound -!missing-field! NSInflectionReferentConceptAttributeName not bound -!missing-field! NSURLFileProtectionCompleteWhenUserInactive not bound -!missing-field! NSURLSessionUploadTaskResumeData not bound -!missing-protocol-member! NSURLSessionTaskDelegate::URLSession:task:didReceiveInformationalResponse: not found -!missing-protocol-member! NSURLSessionTaskDelegate::URLSession:task:needNewBodyStreamFromOffset:completionHandler: not found -!missing-selector! +NSAttributedString::localizedAttributedStringWithFormat:context: not bound -!missing-selector! +NSAttributedString::localizedAttributedStringWithFormat:options:context: not bound -!missing-selector! +NSTermOfAddress::feminine not bound -!missing-selector! +NSTermOfAddress::localizedForLanguageIdentifier:withPronouns: not bound -!missing-selector! +NSTermOfAddress::masculine not bound -!missing-selector! +NSTermOfAddress::neutral not bound -!missing-selector! +NSURL::URLWithString:encodingInvalidCharacters: not bound -!missing-selector! +NSURLComponents::componentsWithString:encodingInvalidCharacters: not bound -!missing-selector! NSAttributedString::initWithFormat:options:locale:context: not bound -!missing-selector! NSAttributedString::initWithFormat:options:locale:context:arguments: not bound -!missing-selector! NSLocale::languageIdentifier not bound -!missing-selector! NSLocale::regionCode not bound -!missing-selector! NSMorphology::definiteness not bound -!missing-selector! NSMorphology::determination not bound -!missing-selector! NSMorphology::grammaticalCase not bound -!missing-selector! NSMorphology::grammaticalPerson not bound -!missing-selector! NSMorphology::pronounType not bound -!missing-selector! NSMorphology::setDefiniteness: not bound -!missing-selector! NSMorphology::setDetermination: not bound -!missing-selector! NSMorphology::setGrammaticalCase: not bound -!missing-selector! NSMorphology::setGrammaticalPerson: not bound -!missing-selector! NSMorphology::setPronounType: not bound -!missing-selector! NSMorphologyPronoun::dependentMorphology not bound -!missing-selector! NSMorphologyPronoun::initWithPronoun:morphology:dependentMorphology: not bound -!missing-selector! NSMorphologyPronoun::morphology not bound -!missing-selector! NSMorphologyPronoun::pronoun not bound -!missing-selector! NSTermOfAddress::languageIdentifier not bound -!missing-selector! NSTermOfAddress::pronouns not bound -!missing-selector! NSURL::initWithString:encodingInvalidCharacters: not bound -!missing-selector! NSURLComponents::initWithString:encodingInvalidCharacters: not bound -!missing-selector! NSURLSession::uploadTaskWithResumeData: not bound -!missing-selector! NSURLSession::uploadTaskWithResumeData:completionHandler: not bound -!missing-selector! NSURLSessionUploadTask::cancelByProducingResumeData: not bound -!missing-type! NSMorphologyPronoun not bound -!missing-type! NSTermOfAddress not bound -!unknown-native-enum! NSNetServiceOptions bound -!missing-field! NSURLDirectoryEntryCountKey not bound From bc491113bb803d537461e78c59e3f9bb12078781 Mon Sep 17 00:00:00 2001 From: Manuel de la Pena Date: Tue, 12 Sep 2023 13:48:37 -0400 Subject: [PATCH 2/7] Update the binding based on the changes from corespotligh. --- src/Foundation/Enum.cs | 3 +++ src/foundation.cs | 4 ---- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/Foundation/Enum.cs b/src/Foundation/Enum.cs index a2be595d37c3..5b0cf5d34e27 100644 --- a/src/Foundation/Enum.cs +++ b/src/Foundation/Enum.cs @@ -1385,6 +1385,9 @@ public enum NSFileProtectionType { CompleteUnlessOpen, [Field ("NSFileProtectionCompleteUntilFirstUserAuthentication")] CompleteUntilFirstUserAuthentication, + [Watch (10, 0), TV (17, 0), NoMac, iOS (17, 0), MacCatalyst (17,0)] + [Field ("NSFileProtectionCompleteWhenUserInactive")] + CompleteWhenUserInactive, [Field ("NSFileProtectionNone")] None, } diff --git a/src/foundation.cs b/src/foundation.cs index 222367e43212..51246a4e8691 100644 --- a/src/foundation.cs +++ b/src/foundation.cs @@ -13599,10 +13599,6 @@ partial interface NSFileManager { [Field ("NSFileProtectionCompleteUntilFirstUserAuthentication")] NSString FileProtectionCompleteUntilFirstUserAuthentication { get; } - [Watch (10, 0), TV (17, 0), NoMac, iOS (17, 0), MacCatalyst (17,0)] - [Field ("NSFileProtectionCompleteWhenUserInactive")] - NSString FileProtectionCompleteWhenUserInactive { get; } - [Field ("NSFileSystemSize")] NSString SystemSize { get; } From 4f105972439893b395fd278feb540a202c524cec Mon Sep 17 00:00:00 2001 From: GitHub Actions Autoformatter Date: Tue, 12 Sep 2023 19:27:57 +0000 Subject: [PATCH 3/7] Auto-format source code --- src/Foundation/Enum.cs | 4 +-- src/foundation.cs | 61 +++++++++++++++++++----------------------- 2 files changed, 29 insertions(+), 36 deletions(-) diff --git a/src/Foundation/Enum.cs b/src/Foundation/Enum.cs index 5b0cf5d34e27..520b5ca1673e 100644 --- a/src/Foundation/Enum.cs +++ b/src/Foundation/Enum.cs @@ -282,7 +282,7 @@ public enum NSDataWritingOptions : ulong { [Mac (11, 0)] [MacCatalyst (13, 1)] FileProtectionCompleteUntilFirstUserAuthentication = 0x40000000, - [iOS (17,0), NoMac, MacCatalyst (17,0), TV (17,0), Watch (10,0)] + [iOS (17, 0), NoMac, MacCatalyst (17, 0), TV (17, 0), Watch (10, 0)] FileProtectionCompleteWhenUserInactive = 0x50000000, } @@ -1385,7 +1385,7 @@ public enum NSFileProtectionType { CompleteUnlessOpen, [Field ("NSFileProtectionCompleteUntilFirstUserAuthentication")] CompleteUntilFirstUserAuthentication, - [Watch (10, 0), TV (17, 0), NoMac, iOS (17, 0), MacCatalyst (17,0)] + [Watch (10, 0), TV (17, 0), NoMac, iOS (17, 0), MacCatalyst (17, 0)] [Field ("NSFileProtectionCompleteWhenUserInactive")] CompleteWhenUserInactive, [Field ("NSFileProtectionNone")] diff --git a/src/foundation.cs b/src/foundation.cs index 51246a4e8691..100e02d3878d 100644 --- a/src/foundation.cs +++ b/src/foundation.cs @@ -890,10 +890,9 @@ public enum NSAttributedStringNameKey { } - [Watch (10,0), TV (17,0), Mac (14,0), iOS (17,0), MacCatalyst (17,0)] + [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [Native] - public enum NSGrammaticalCase : long - { + public enum NSGrammaticalCase : long { NotSet = 0, Nominative, Accusative, @@ -911,38 +910,34 @@ public enum NSGrammaticalCase : long Translative, } - [Watch (10,0), TV (17,0), Mac (14,0), iOS (17,0), MacCatalyst (17,0)] + [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [Native] - public enum NSGrammaticalPronounType : long - { + public enum NSGrammaticalPronounType : long { NotSet = 0, Personal, Reflexive, Possessive, } - [Watch (10,0), TV (17,0), Mac (14,0), iOS (17,0), MacCatalyst (17,0)] + [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [Native] - public enum NSGrammaticalDefiniteness : long - { + public enum NSGrammaticalDefiniteness : long { NotSet = 0, Indefinite, Definite, } - [Watch (10,0), TV (17,0), Mac (14,0), iOS (17,0), MacCatalyst (17,0)] + [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [Native] - public enum NSGrammaticalDetermination : long - { + public enum NSGrammaticalDetermination : long { NotSet = 0, Independent, Dependent, } - [Watch (10,0), TV (17,0), Mac (14,0), iOS (17,0), MacCatalyst (17,0)] + [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [Native] - public enum NSGrammaticalPerson : long - { + public enum NSGrammaticalPerson : long { NotSet = 0, First, Second, @@ -5311,11 +5306,11 @@ interface NSLocale : NSSecureCoding, NSCopying { [return: NullAllowed] string GetLocalizedCalendarIdentifier (string calendarIdentifier); - [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17,0)] + [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [Export ("languageIdentifier")] string LanguageIdentifier { get; } - [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17,0)] + [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [NullAllowed, Export ("regionCode")] string RegionCode { get; } } @@ -6268,7 +6263,7 @@ partial interface NSUrl : NSSecureCoding, NSCopying [Static] NSUrl _FromStringRelative (string url, NSUrl relative); - [Watch (10,0), TV (17,0), Mac (14,0), iOS (17,0), MacCatalyst (17,0)] + [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [Static] [Export ("URLWithString:encodingInvalidCharacters:")] [return: NullAllowed] @@ -7195,7 +7190,7 @@ partial interface NSUrlComponents : NSCopying { [Static, Export ("componentsWithString:")] NSUrlComponents FromString (string urlString); - [Watch (10,0), TV (17,0), Mac (14,0), iOS (17,0), MacCatalyst (17,0)] + [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [Static] [Export ("componentsWithString:encodingInvalidCharacters:")] [return: NullAllowed] @@ -7849,12 +7844,12 @@ partial interface NSUrlSession { [Export ("webSocketTaskWithRequest:")] NSUrlSessionWebSocketTask CreateWebSocketTask (NSUrlRequest request); - [Watch (10,0), TV (17,0), Mac (14,0), iOS (17,0), MacCatalyst (17,0)] + [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [Export ("uploadTaskWithResumeData:")] NSUrlSessionUploadTask UploadTask (NSData resumeData); - [Async (ResultTypeName = "NSUrlSessionUploadTaskResumeRequest")] - [Watch (10,0), TV (17,0), Mac (14,0), iOS (17,0), MacCatalyst (17,0)] + [Async (ResultTypeName = "NSUrlSessionUploadTaskResumeRequest")] + [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [Export ("uploadTaskWithResumeData:completionHandler:")] NSUrlSessionUploadTask UploadTask (NSData resumeData, Action completionHandler); } @@ -8320,11 +8315,11 @@ partial interface NSUrlSessionTaskDelegate { [Export ("URLSession:didCreateTask:")] void DidCreateTask (NSUrlSession session, NSUrlSessionTask task); - [Watch (10,0), TV (17,0), Mac (14,0), iOS (17,0), MacCatalyst (17,0)] + [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [Export ("URLSession:task:didReceiveInformationalResponse:")] void DidReceiveInformationalResponse (NSUrlSession session, NSUrlSessionTask task, NSHttpUrlResponse response); - [Watch (10,0), TV (17,0), Mac (14,0), iOS (17,0), MacCatalyst (17,0)] + [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [Export ("URLSession:task:needNewBodyStreamFromOffset:completionHandler:")] void NeedNewBodyStreamFromOffset (NSUrlSession session, NSUrlSessionTask task, long offset, Action completionHandler); } @@ -18196,11 +18191,10 @@ interface NSAttributedStringMarkdownSourcePosition : NSCopying, NSSecureCoding { NSRange RangeInString (string @string); } - [Watch (10,0), TV (17,0), Mac (14,0), iOS (17,0), MacCatalyst (17,0)] - [BaseType (typeof(NSObject))] + [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [BaseType (typeof (NSObject))] [DisableDefaultCtor] - interface NSTermOfAddress : NSCopying, NSSecureCoding - { + interface NSTermOfAddress : NSCopying, NSSecureCoding { [Static] [Export ("neutral")] NSTermOfAddress Neutral { get; } @@ -18215,20 +18209,19 @@ interface NSTermOfAddress : NSCopying, NSSecureCoding [Static] [Export ("localizedForLanguageIdentifier:withPronouns:")] - NSTermOfAddress GetLocalized (string language, NSMorphologyPronoun[] pronouns); + NSTermOfAddress GetLocalized (string language, NSMorphologyPronoun [] pronouns); [NullAllowed, Export ("languageIdentifier")] string LanguageIdentifier { get; } [NullAllowed, Export ("pronouns", ArgumentSemantic.Copy)] - NSMorphologyPronoun[] Pronouns { get; } + NSMorphologyPronoun [] Pronouns { get; } } - [Watch (10,0), TV (17,0), Mac (14,0), iOS (17,0), MacCatalyst (17,0)] - [BaseType (typeof(NSObject))] + [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [BaseType (typeof (NSObject))] [DisableDefaultCtor] - interface NSMorphologyPronoun : NSCopying, NSSecureCoding - { + interface NSMorphologyPronoun : NSCopying, NSSecureCoding { [Export ("initWithPronoun:morphology:dependentMorphology:")] NativeHandle Constructor (string pronoun, NSMorphology morphology, [NullAllowed] NSMorphology dependentMorphology); From f3de459b9d6cbeca9c498cc7558d3c54beb60de0 Mon Sep 17 00:00:00 2001 From: Manuel de la Pena Date: Wed, 13 Sep 2023 11:11:24 -0400 Subject: [PATCH 4/7] Apply suggestions from code review Co-authored-by: Rolf Bjarne Kvinge --- src/foundation.cs | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/src/foundation.cs b/src/foundation.cs index 100e02d3878d..29ab1754fccd 100644 --- a/src/foundation.cs +++ b/src/foundation.cs @@ -882,11 +882,11 @@ public enum NSAttributedStringNameKey { [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [Field ("NSInflectionAgreementConceptAttributeName")] - InflectionConcept, + InflectionAgreementConcept, [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [Field ("NSInflectionReferentConceptAttributeName")] - InflectionReferentConceptAttributeName, + InflectionReferentConcept, } @@ -944,7 +944,6 @@ public enum NSGrammaticalPerson : long { Third, } - [NoWatch] [NoTV] // really inside WebKit [iOS (13, 0)] @@ -6989,7 +6988,7 @@ partial interface NSUrl : NSSecureCoding, NSCopying [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [Field ("NSURLDirectoryEntryCountKey")] - NSString NSURLDirectoryEntryCountKey { get; } + NSString DirectoryEntryCountKey { get; } [Watch (7, 0)] [TV (14, 0)] @@ -7846,12 +7845,14 @@ partial interface NSUrlSession { [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [Export ("uploadTaskWithResumeData:")] - NSUrlSessionUploadTask UploadTask (NSData resumeData); + [return: ForcedType] + NSUrlSessionUploadTask CreateUploadTask (NSData resumeData); [Async (ResultTypeName = "NSUrlSessionUploadTaskResumeRequest")] [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [Export ("uploadTaskWithResumeData:completionHandler:")] - NSUrlSessionUploadTask UploadTask (NSData resumeData, Action completionHandler); + [return: ForcedType] + NSUrlSessionUploadTask CreateUploadTask (NSData resumeData, Action completionHandler); } [MacCatalyst (13, 1)] @@ -8042,7 +8043,7 @@ partial interface NSUrlSessionUploadTask { [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [Field ("NSURLSessionUploadTaskResumeData")] - NSString TaskResumeDataKey { get; } + NSString ResumeDataKey { get; } [Async] [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] @@ -8321,7 +8322,7 @@ partial interface NSUrlSessionTaskDelegate { [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [Export ("URLSession:task:needNewBodyStreamFromOffset:completionHandler:")] - void NeedNewBodyStreamFromOffset (NSUrlSession session, NSUrlSessionTask task, long offset, Action completionHandler); + void NeedNewBodyStream (NSUrlSession session, NSUrlSessionTask task, long offset, Action completionHandler); } [MacCatalyst (13, 1)] @@ -18002,6 +18003,7 @@ interface NSMorphology : NSCopying, NSSecureCoding { [Obsoleted (PlatformName.MacOSX, 14, 0, message: "Use 'NSTermOfAddress' instead.")] [Obsoleted (PlatformName.iOS, 17, 0, message: "Use 'NSTermOfAddress' instead.")] + [Obsoleted (PlatformName.MacCatalyst, 17, 0, message: "Use 'NSTermOfAddress' instead.")] [Obsoleted (PlatformName.TvOS, 17, 0, message: "Use 'NSTermOfAddress' instead.")] [Obsoleted (PlatformName.WatchOS, 10, 0, message: "Use 'NSTermOfAddress' instead.")] [Export ("customPronounForLanguage:")] @@ -18010,6 +18012,7 @@ interface NSMorphology : NSCopying, NSSecureCoding { [Obsoleted (PlatformName.MacOSX, 14, 0, message: "Use 'NSTermOfAddress' instead.")] [Obsoleted (PlatformName.iOS, 17, 0, message: "Use 'NSTermOfAddress' instead.")] + [Obsoleted (PlatformName.MacCatalyst, 17, 0, message: "Use 'NSTermOfAddress' instead.")] [Obsoleted (PlatformName.TvOS, 17, 0, message: "Use 'NSTermOfAddress' instead.")] [Obsoleted (PlatformName.WatchOS, 10, 0, message: "Use 'NSTermOfAddress' instead.")] [Export ("setCustomPronoun:forLanguage:error:")] @@ -18045,6 +18048,7 @@ interface NSMorphology : NSCopying, NSSecureCoding { [Obsoleted (PlatformName.MacOSX, 14, 0, message: "Use 'NSTermOfAddress' instead.")] [Obsoleted (PlatformName.iOS, 17, 0, message: "Use 'NSTermOfAddress' instead.")] + [Obsoleted (PlatformName.MacCatalyst, 17, 0, message: "Use 'NSTermOfAddress' instead.")] [Obsoleted (PlatformName.TvOS, 17, 0, message: "Use 'NSTermOfAddress' instead.")] [Obsoleted (PlatformName.WatchOS, 10, 0, message: "Use 'NSTermOfAddress' instead.")] [Watch (8, 0), TV (15, 0), Mac (12, 0), iOS (15, 0), MacCatalyst (15, 0)] From 38d1c534ba9e2df963ad8ce4d37fe99b0d2aca9b Mon Sep 17 00:00:00 2001 From: Manuel de la Pena Saenz Date: Mon, 25 Sep 2023 16:16:54 -0400 Subject: [PATCH 5/7] Address reviews and clean xtro on dotnet. --- src/foundation.cs | 4 ++-- .../api-annotations-dotnet/iOS-Foundation.ignore | 3 --- .../api-annotations-dotnet/macOS-Foundation.ignore | 13 ------------- .../api-annotations-dotnet/tvOS-Foundation.ignore | 14 -------------- 4 files changed, 2 insertions(+), 32 deletions(-) diff --git a/src/foundation.cs b/src/foundation.cs index 29ab1754fccd..b1fa5c5e2b30 100644 --- a/src/foundation.cs +++ b/src/foundation.cs @@ -6266,7 +6266,7 @@ partial interface NSUrl : NSSecureCoding, NSCopying [Static] [Export ("URLWithString:encodingInvalidCharacters:")] [return: NullAllowed] - NSUrl FromStringEncoded (string url, bool encodingInvalidCharacters); + NSUrl FromString (string url, bool encodingInvalidCharacters); [Export ("absoluteString")] [NullAllowed] @@ -7193,7 +7193,7 @@ partial interface NSUrlComponents : NSCopying { [Static] [Export ("componentsWithString:encodingInvalidCharacters:")] [return: NullAllowed] - NSUrlComponents FromStringEncoded (string url, bool encodingInvalidCharacters); + NSUrlComponents FromString (string url, bool encodingInvalidCharacters); [Export ("URL")] NSUrl Url { get; } diff --git a/tests/xtro-sharpie/api-annotations-dotnet/iOS-Foundation.ignore b/tests/xtro-sharpie/api-annotations-dotnet/iOS-Foundation.ignore index 55ad2b153a3b..8b5c3518b6f1 100644 --- a/tests/xtro-sharpie/api-annotations-dotnet/iOS-Foundation.ignore +++ b/tests/xtro-sharpie/api-annotations-dotnet/iOS-Foundation.ignore @@ -5,6 +5,3 @@ ## does not exists in iOS as a type - but some API refers to it (messy) !unknown-type! NSPortMessage bound - -# we provide a static method since we already have a constructor with the same params -!missing-selector! NSURLComponents::initWithString:encodingInvalidCharacters: not bound diff --git a/tests/xtro-sharpie/api-annotations-dotnet/macOS-Foundation.ignore b/tests/xtro-sharpie/api-annotations-dotnet/macOS-Foundation.ignore index 3e6358341432..5eac86edbf70 100644 --- a/tests/xtro-sharpie/api-annotations-dotnet/macOS-Foundation.ignore +++ b/tests/xtro-sharpie/api-annotations-dotnet/macOS-Foundation.ignore @@ -568,19 +568,6 @@ !missing-selector! NSXMLDTDNode::init not bound !missing-selector! NSXMLNode::detach not bound -# we cannot deal with vargs -!missing-selector! +NSAttributedString::localizedAttributedStringWithFormat:context: not bound -!missing-selector! +NSAttributedString::localizedAttributedStringWithFormat:options:context: not bound -!missing-selector! NSAttributedString::initWithFormat:options:locale:context: not bound -!missing-selector! NSAttributedString::initWithFormat:options:locale:context:arguments: not bound - -# we already expose static methods and we do not need the construtors -!missing-selector! NSURL::initWithString:encodingInvalidCharacters: not bound -!missing-selector! NSURLComponents::initWithString:encodingInvalidCharacters: not bound - -# use with the vargs api and therefore no needed -!missing-field! NSInflectionConceptsKey not bound - ## these are implemented in a way that xtro doesn't see !missing-selector! NSAppleEventDescriptor::initListDescriptor not bound !missing-selector! NSAppleEventDescriptor::initRecordDescriptor not bound diff --git a/tests/xtro-sharpie/api-annotations-dotnet/tvOS-Foundation.ignore b/tests/xtro-sharpie/api-annotations-dotnet/tvOS-Foundation.ignore index 58bac1f55b90..2e7ff513f4fd 100644 --- a/tests/xtro-sharpie/api-annotations-dotnet/tvOS-Foundation.ignore +++ b/tests/xtro-sharpie/api-annotations-dotnet/tvOS-Foundation.ignore @@ -12,17 +12,3 @@ !missing-protocol-conformance! NSXPCConnection should conform to NSXPCProxyCreating !missing-selector! NSXPCInterface::interfaceForSelector:argumentIndex:ofReply: not bound !missing-selector! NSXPCInterface::setInterface:forSelector:argumentIndex:ofReply: not bound - -# we cannot deal with vargs -!missing-selector! +NSAttributedString::localizedAttributedStringWithFormat:context: not bound -!missing-selector! +NSAttributedString::localizedAttributedStringWithFormat:options:context: not bound -!missing-selector! NSAttributedString::initWithFormat:options:locale:context: not bound -!missing-selector! NSAttributedString::initWithFormat:options:locale:context:arguments: not bound - -# we already expose static methods and we do not need the construtors -!missing-selector! NSURL::initWithString:encodingInvalidCharacters: not bound -!missing-selector! NSURLComponents::initWithString:encodingInvalidCharacters: not bound - -# use with the vargs api and therefore no needed -!missing-field! NSInflectionConceptsKey not bound - From d5266935ee1456eaa5ebc3d821318e108751f959 Mon Sep 17 00:00:00 2001 From: Manuel de la Pena Saenz Date: Wed, 27 Sep 2023 11:04:55 -0400 Subject: [PATCH 6/7] Fix xtro dupes. --- tests/xtro-sharpie/iOS-Foundation.ignore | 3 --- tests/xtro-sharpie/tvOS-Foundation.ignore | 13 ------------- 2 files changed, 16 deletions(-) diff --git a/tests/xtro-sharpie/iOS-Foundation.ignore b/tests/xtro-sharpie/iOS-Foundation.ignore index 19f000fc03a1..8908d5f23b0c 100644 --- a/tests/xtro-sharpie/iOS-Foundation.ignore +++ b/tests/xtro-sharpie/iOS-Foundation.ignore @@ -9,8 +9,5 @@ # The selectors Apple *currently* dislike are removed from the iOS build !unknown-type! NSPortMessage bound -# we provide a static method since we already have a constructor with the same params -!missing-selector! NSURLComponents::initWithString:encodingInvalidCharacters: not bound - # We will not remove it for classic, was removed for dotnet !unknown-native-enum! NSBundleExecutableArchitecture bound diff --git a/tests/xtro-sharpie/tvOS-Foundation.ignore b/tests/xtro-sharpie/tvOS-Foundation.ignore index 059452ba09e3..db0ea2903fbe 100644 --- a/tests/xtro-sharpie/tvOS-Foundation.ignore +++ b/tests/xtro-sharpie/tvOS-Foundation.ignore @@ -14,17 +14,4 @@ !missing-selector! NSXPCInterface::setInterface:forSelector:argumentIndex:ofReply: not bound !missing-enum! NSNetServicesError not bound -# we cannot deal with vargs -!missing-selector! +NSAttributedString::localizedAttributedStringWithFormat:context: not bound -!missing-selector! +NSAttributedString::localizedAttributedStringWithFormat:options:context: not bound -!missing-selector! NSAttributedString::initWithFormat:options:locale:context: not bound -!missing-selector! NSAttributedString::initWithFormat:options:locale:context:arguments: not bound - -# we already expose static methods and we do not need the construtors -!missing-selector! NSURL::initWithString:encodingInvalidCharacters: not bound -!missing-selector! NSURLComponents::initWithString:encodingInvalidCharacters: not bound - -# use with the vargs api and therefore no needed -!missing-field! NSInflectionConceptsKey not bound - !missing-selector! NSURLSession::getTasksWithCompletionHandler: not bound From 3892a70aa1dd39c764f66679a5b4cde361aef0ee Mon Sep 17 00:00:00 2001 From: Manuel de la Pena Date: Mon, 16 Oct 2023 16:35:55 -0400 Subject: [PATCH 7/7] Address breaking change. --- src/Foundation/Enum.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Foundation/Enum.cs b/src/Foundation/Enum.cs index 520b5ca1673e..cdb51c2f02a6 100644 --- a/src/Foundation/Enum.cs +++ b/src/Foundation/Enum.cs @@ -1385,10 +1385,10 @@ public enum NSFileProtectionType { CompleteUnlessOpen, [Field ("NSFileProtectionCompleteUntilFirstUserAuthentication")] CompleteUntilFirstUserAuthentication, + [Field ("NSFileProtectionNone")] + None, [Watch (10, 0), TV (17, 0), NoMac, iOS (17, 0), MacCatalyst (17, 0)] [Field ("NSFileProtectionCompleteWhenUserInactive")] CompleteWhenUserInactive, - [Field ("NSFileProtectionNone")] - None, } }