Skip to content

Commit d5b5944

Browse files
authored
[Foundation] Implement Xcode 16.0 beta 1-6 changes. (#21065)
Note: there were no changes in beta 2, beta 4, beta 5 or beta 6.
1 parent c7003b6 commit d5b5944

12 files changed

Lines changed: 90 additions & 169 deletions

src/Foundation/Enum.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,7 @@ public enum NSCalendarUnit : ulong {
245245
YearForWeakOfYear = (1 << 14),
246246

247247
Nanosecond = (1 << 15),
248+
DayOfYear = (1 << 16),
248249

249250
Calendar = (1 << 20),
250251
TimeZone = (1 << 21),

src/foundation.cs

Lines changed: 79 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -891,6 +891,9 @@ public enum NSAttributedStringNameKey {
891891
[Field ("NSInflectionReferentConceptAttributeName")]
892892
InflectionReferentConcept,
893893

894+
[Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)]
895+
[Field ("NSLocalizedNumberFormatAttributeName")]
896+
LocalizedNumberFormat,
894897
}
895898

896899
[Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)]
@@ -2042,6 +2045,10 @@ interface NSDateComponents : NSSecureCoding, NSCopying, INSCopying, INSSecureCod
20422045
[Export ("yearForWeekOfYear")]
20432046
nint YearForWeekOfYear { get; set; }
20442047

2048+
[Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)]
2049+
[Export ("dayOfYear")]
2050+
nint DayOfYear { get; set; }
2051+
20452052
[Export ("leapMonth")]
20462053
bool IsLeapMonth { [Bind ("isLeapMonth")] get; set; }
20472054

@@ -8578,6 +8585,19 @@ interface NSUndoManager {
85788585
[Export ("registerUndoWithTarget:handler:")]
85798586
void RegisterUndo (NSObject target, Action<NSObject> undoHandler);
85808587

8588+
[Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)]
8589+
[Export ("undoActionUserInfoValueForKey:")]
8590+
[return: NullAllowed]
8591+
NSObject GetUndoActionUserInfoValue (string key);
8592+
8593+
[Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)]
8594+
[Export ("redoActionUserInfoValueForKey:")]
8595+
[return: NullAllowed]
8596+
NSObject GetRedoActionUserInfoValue (string key);
8597+
8598+
[Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)]
8599+
[Export ("setActionUserInfoValue:forKey:")]
8600+
void SetActionUserInfoValue ([NullAllowed] NSObject info, string key);
85818601
}
85828602

85838603
[BaseType (typeof (NSObject), Name = "NSURLProtectionSpace")]
@@ -8747,6 +8767,10 @@ interface NSUrlRequest : NSSecureCoding, NSMutableCopying {
87478767
[MacCatalyst (16, 1)]
87488768
[Export ("requiresDNSSECValidation")]
87498769
bool RequiresDnsSecValidation { get; }
8770+
8771+
[Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)]
8772+
[Export ("allowsPersistentDNS")]
8773+
bool AllowsPersistentDns { get; }
87508774
}
87518775

87528776
[BaseType (typeof (NSDictionary))]
@@ -8952,6 +8976,10 @@ interface NSMutableUrlRequest {
89528976
[MacCatalyst (16, 1)]
89538977
[Export ("requiresDNSSECValidation")]
89548978
bool RequiresDnsSecValidation { get; set; }
8979+
8980+
[Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)]
8981+
[Export ("allowsPersistentDNS")]
8982+
bool AllowsPersistentDns { get; set; }
89558983
}
89568984

89578985
[BaseType (typeof (NSObject), Name = "NSURLResponse")]
@@ -8984,7 +9012,10 @@ interface NSStream {
89849012
[Export ("close")]
89859013
void Close ();
89869014

8987-
[Export ("delegate", ArgumentSemantic.Assign), NullAllowed]
9015+
// Header says:
9016+
// assign /* actually weak */
9017+
// so bind as weak
9018+
[Export ("delegate", ArgumentSemantic.Weak), NullAllowed]
89889019
NSObject WeakDelegate { get; set; }
89899020

89909021
[Wrap ("WeakDelegate")]
@@ -12706,6 +12737,10 @@ interface NSNumberFormatter {
1270612737

1270712738
[Export ("partialStringValidationEnabled")]
1270812739
bool PartialStringValidationEnabled { [Bind ("isPartialStringValidationEnabled")] get; set; }
12740+
12741+
[Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)]
12742+
[Export ("minimumGroupingDigits")]
12743+
nint MinimumGroupingDigits { get; set; }
1270912744
}
1271012745

1271112746
[BaseType (typeof (NSNumber))]
@@ -18319,6 +18354,11 @@ interface NSTermOfAddress : NSCopying, NSSecureCoding {
1831918354

1832018355
[NullAllowed, Export ("pronouns", ArgumentSemantic.Copy)]
1832118356
NSMorphologyPronoun [] Pronouns { get; }
18357+
18358+
[Static]
18359+
[Export ("currentUser")]
18360+
[Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)]
18361+
NSTermOfAddress CurrentUser { get; }
1832218362
}
1832318363

1832418364
[Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)]
@@ -18465,4 +18505,42 @@ float DefaultTabInterval {
1846518505
int PrefixSpaces { get; set; }
1846618506
}
1846718507

18508+
[Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)]
18509+
[BaseType (typeof (NSObject))]
18510+
[DisableDefaultCtor]
18511+
interface NSKeyValueSharedObserversSnapshot {
18512+
}
18513+
18514+
[Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)]
18515+
[BaseType (typeof (NSObject))]
18516+
[DisableDefaultCtor]
18517+
interface NSKeyValueSharedObservers {
18518+
[Export ("initWithObservableClass:")]
18519+
NativeHandle Constructor (Class observableClass);
18520+
18521+
[Wrap ("this (new Class (observableType))")]
18522+
NativeHandle Constructor (Type observableType);
18523+
18524+
[Export ("addSharedObserver:forKey:options:context:")]
18525+
void AddSharedObserver (NSObject observer, string forKey, NSKeyValueObservingOptions options, IntPtr context);
18526+
18527+
[Export ("snapshot")]
18528+
NSKeyValueSharedObserversSnapshot GetSnapshot ();
18529+
}
18530+
18531+
[Category, BaseType (typeof (NSObject))]
18532+
[Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)]
18533+
interface NSKeyValueSharedObserverRegistration_NSObject {
18534+
[Export ("setSharedObservers:")]
18535+
void SetSharedObservers ([NullAllowed] NSKeyValueSharedObserversSnapshot sharedObservers);
18536+
}
18537+
18538+
[BaseType (typeof (NSObject))]
18539+
[Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)]
18540+
[DisableDefaultCtor]
18541+
interface NSLocalizedNumberFormatRule : NSCopying, NSSecureCoding {
18542+
[Static]
18543+
[Export ("automatic")]
18544+
NSLocalizedNumberFormatRule Automatic { get; }
18545+
}
1846818546
}

tests/cecil-tests/Documentation.KnownFailures.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9233,6 +9233,7 @@ F:Foundation.NSAttributedStringNameKey.InflectionReferentConcept
92339233
F:Foundation.NSAttributedStringNameKey.InflectionRule
92349234
F:Foundation.NSAttributedStringNameKey.InlinePresentationIntent
92359235
F:Foundation.NSAttributedStringNameKey.LanguageIdentifier
9236+
F:Foundation.NSAttributedStringNameKey.LocalizedNumberFormat
92369237
F:Foundation.NSAttributedStringNameKey.MarkdownSourcePosition
92379238
F:Foundation.NSAttributedStringNameKey.Morphology
92389239
F:Foundation.NSAttributedStringNameKey.PresentationIntentAttributeName
@@ -9291,6 +9292,7 @@ F:Foundation.NSCalendarType.Persian
92919292
F:Foundation.NSCalendarType.Taiwan
92929293
F:Foundation.NSCalendarUnit.Calendar
92939294
F:Foundation.NSCalendarUnit.Day
9295+
F:Foundation.NSCalendarUnit.DayOfYear
92949296
F:Foundation.NSCalendarUnit.Era
92959297
F:Foundation.NSCalendarUnit.Hour
92969298
F:Foundation.NSCalendarUnit.Minute
@@ -34704,6 +34706,8 @@ M:Foundation.NSKeyedUnarchiverDelegate.DecodedObject(Foundation.NSKeyedUnarchive
3470434706
M:Foundation.NSKeyedUnarchiverDelegate.Finished(Foundation.NSKeyedUnarchiver)
3470534707
M:Foundation.NSKeyedUnarchiverDelegate.Finishing(Foundation.NSKeyedUnarchiver)
3470634708
M:Foundation.NSKeyedUnarchiverDelegate.ReplacingObject(Foundation.NSKeyedUnarchiver,Foundation.NSObject,Foundation.NSObject)
34709+
M:Foundation.NSKeyValueSharedObserverRegistration_NSObject.SetSharedObservers(Foundation.NSObject,Foundation.NSKeyValueSharedObserversSnapshot)
34710+
M:Foundation.NSKeyValueSharedObservers.#ctor(System.Type)
3470734711
M:Foundation.NSKeyValueSorting_NSMutableOrderedSet.SortUsingDescriptors(Foundation.NSMutableOrderedSet,Foundation.NSSortDescriptor[])
3470834712
M:Foundation.NSKeyValueSorting_NSOrderedSet.GetSortedArray(Foundation.NSOrderedSet,Foundation.NSSortDescriptor[])
3470934713
M:Foundation.NSLinguisticAnalysis.EnumerateLinguisticTags(Foundation.NSString,Foundation.NSRange,Foundation.NSLinguisticTagScheme,Foundation.NSLinguisticTaggerOptions,Foundation.NSOrthography,Foundation.NSEnumerateLinguisticTagsEnumerator)
@@ -34717,6 +34721,8 @@ M:Foundation.NSLocale.GetCountryCodeDisplayName(System.String)
3471734721
M:Foundation.NSLocale.GetCurrencyCodeDisplayName(System.String)
3471834722
M:Foundation.NSLocale.GetIdentifierDisplayName(System.String)
3471934723
M:Foundation.NSLocale.GetLanguageCodeDisplayName(System.String)
34724+
M:Foundation.NSLocalizedNumberFormatRule.Copy(Foundation.NSZone)
34725+
M:Foundation.NSLocalizedNumberFormatRule.EncodeTo(Foundation.NSCoder)
3472034726
M:Foundation.NSLock.Lock
3472134727
M:Foundation.NSLock.Unlock
3472234728
M:Foundation.NSMachPort.Dispose(System.Boolean)
@@ -79989,6 +79995,7 @@ T:Foundation.NSKeyedUnarchiverDelegate
7998979995
T:Foundation.NSKeyValueChange
7999079996
T:Foundation.NSKeyValueObservingOptions
7999179997
T:Foundation.NSKeyValueSetMutationKind
79998+
T:Foundation.NSKeyValueSharedObserverRegistration_NSObject
7999279999
T:Foundation.NSKeyValueSorting_NSMutableOrderedSet
7999380000
T:Foundation.NSKeyValueSorting_NSOrderedSet
7999480001
T:Foundation.NSLengthFormatterUnit

tests/introspection/ApiProtocolTest.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -596,6 +596,9 @@ protected virtual bool Skip (Type type, string protocolName)
596596
case "UIScreenEdgePanGestureRecognizer":
597597
case "UIHoverGestureRecognizer":
598598
return true;
599+
case "NSLocalizedNumberFormatRule":
600+
// Foundation.MonoTouchException : Objective-C exception thrown. Name: NSInvalidArgumentException Reason: *** -supportsSecureCoding cannot be sent to an abstract object of class NSLocalizedNumberFormatRule: Create a concrete instance!
601+
return true;
599602
}
600603
break;
601604
// conformance added in Xcode 8 (iOS 10 / macOS 10.12)

tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-Foundation.todo

Lines changed: 0 additions & 21 deletions
This file was deleted.

tests/xtro-sharpie/api-annotations-dotnet/iOS-Foundation.todo

Lines changed: 0 additions & 21 deletions
This file was deleted.

tests/xtro-sharpie/api-annotations-dotnet/macOS-Foundation.todo

Lines changed: 0 additions & 21 deletions
This file was deleted.

tests/xtro-sharpie/api-annotations-dotnet/tvOS-Foundation.todo

Lines changed: 0 additions & 21 deletions
This file was deleted.

tests/xtro-sharpie/iOS-Foundation.todo

Lines changed: 0 additions & 21 deletions
This file was deleted.

tests/xtro-sharpie/macOS-Foundation.todo

Lines changed: 0 additions & 21 deletions
This file was deleted.

0 commit comments

Comments
 (0)