Skip to content

Commit 6377d06

Browse files
rolfbjarneGitHub Actions Autoformatterdalexsoto
authored
[CloudKit] Update to Xcode 26 beta 1-5. (#23582)
Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com> Co-authored-by: Alex Soto <alex@soto.dev>
1 parent d7338aa commit 6377d06

File tree

6 files changed

+116
-139
lines changed

6 files changed

+116
-139
lines changed

src/CloudKit/Enums.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ public enum CKErrorCode : long {
127127
/// <summary>To be added.</summary>
128128
AssetNotAvailable = 35,
129129
TemporarilyUnavailable = 36,
130+
ParticipantAlreadyInvited = 37,
130131
}
131132

132133
// NSInteger -> CKModifyRecordsOperation.h
@@ -321,6 +322,8 @@ public enum CKShareParticipantRole : long {
321322
PrivateUser = 3,
322323
/// <summary>To be added.</summary>
323324
PublicUser = 4,
325+
[MacCatalyst (26, 0), TV (26, 0), Mac (26, 0), iOS (26, 0)]
326+
Administrator = 2,
324327
}
325328

326329
[NoTV, Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)]
@@ -394,4 +397,10 @@ public enum CKSyncEnginePendingDatabaseChangeType : long {
394397
DeleteZone,
395398
}
396399

400+
[TV (26, 0), Mac (26, 0), MacCatalyst (26, 0), iOS (26, 0)]
401+
[Native]
402+
public enum CKRecordZoneEncryptionScope : long {
403+
Record,
404+
Zone,
405+
}
397406
}

src/cloudkit.cs

Lines changed: 107 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,10 @@
33
using ObjCRuntime;
44
using Foundation;
55
using CoreLocation;
6-
#if !TVOS
6+
#if HAS_CONTACTS
77
using Contacts;
8+
#else
9+
using CNContact = Foundation.NSObject;
810
#endif
911

1012
namespace CloudKit {
@@ -173,6 +175,35 @@ interface CKShare {
173175

174176
[Export ("removeParticipant:")]
175177
void Remove (CKShareParticipant participant);
178+
179+
[MacCatalyst (18, 0), TV (18, 0), Mac (15, 0), iOS (18, 0)]
180+
[Export ("oneTimeURLForParticipantID:")]
181+
[return: NullAllowed]
182+
NSUrl GetOneTimeUrl (string participantId);
183+
184+
[MacCatalyst (26, 0), TV (26, 0), Mac (26, 0), iOS (26, 0)]
185+
[Export ("requesters", ArgumentSemantic.Copy)]
186+
CKShareAccessRequester [] Requesters { get; }
187+
188+
[MacCatalyst (26, 0), TV (26, 0), Mac (26, 0), iOS (26, 0)]
189+
[Export ("blockedIdentities", ArgumentSemantic.Copy)]
190+
CKShareBlockedIdentity [] BlockedIdentities { get; }
191+
192+
[MacCatalyst (26, 0), TV (26, 0), Mac (26, 0), iOS (26, 0)]
193+
[Export ("allowsAccessRequests")]
194+
bool AllowsAccessRequests { get; set; }
195+
196+
[MacCatalyst (26, 0), TV (26, 0), Mac (26, 0), iOS (26, 0)]
197+
[Export ("denyRequesters:")]
198+
void DenyRequesters (CKShareAccessRequester [] requesters);
199+
200+
[MacCatalyst (26, 0), TV (26, 0), Mac (26, 0), iOS (26, 0)]
201+
[Export ("blockRequesters:")]
202+
void BlockRequesters (CKShareAccessRequester [] requesters);
203+
204+
[MacCatalyst (26, 0), TV (26, 0), Mac (26, 0), iOS (26, 0)]
205+
[Export ("unblockIdentities:")]
206+
void UnblockIdentities (CKShareBlockedIdentity [] blockedIdentities);
176207
}
177208

178209
/// <summary>Constants used by various CloudKit classes.</summary>
@@ -227,6 +258,19 @@ interface CKShareParticipant : NSSecureCoding, NSCopying {
227258
// This showed up in Xcode 16's b1 headers, but according to the availability attributes it's always been available.
228259
[Export ("participantID", ArgumentSemantic.Copy)]
229260
string ParticipantId { get; }
261+
262+
[MacCatalyst (26, 0), TV (26, 0), Mac (26, 0), iOS (26, 0)]
263+
[Export ("isApprovedRequester")]
264+
bool IsApprovedRequester { get; }
265+
266+
[MacCatalyst (26, 0), TV (26, 0), Mac (26, 0), iOS (26, 0)]
267+
[NullAllowed, Export ("dateAddedToShare", ArgumentSemantic.Copy)]
268+
NSDate DateAddedToShare { get; }
269+
270+
[MacCatalyst (18, 0), TV (18, 0), Mac (15, 0), iOS (18, 0)]
271+
[Static]
272+
[Export ("oneTimeURLParticipant")]
273+
CKShareParticipant GetOneTimeUrlParticipant ();
230274
}
231275

232276
[MacCatalyst (13, 1)]
@@ -1779,6 +1823,10 @@ interface CKRecordZone : NSSecureCoding, NSCopying {
17791823
[TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)]
17801824
[NullAllowed, Export ("share", ArgumentSemantic.Copy)]
17811825
CKReference Share { get; }
1826+
1827+
[MacCatalyst (26, 0), TV (26, 0), Mac (26, 0), iOS (26, 0)]
1828+
[Export ("encryptionScope", ArgumentSemantic.Assign)]
1829+
CKRecordZoneEncryptionScope EncryptionScope { get; set; }
17821830
}
17831831

17841832
[MacCatalyst (13, 1)]
@@ -2253,6 +2301,14 @@ interface CKAllowedSharingOptions : NSSecureCoding, NSCopying {
22532301
[Static]
22542302
[Export ("standardOptions", ArgumentSemantic.Strong)]
22552303
CKAllowedSharingOptions StandardOptions { get; }
2304+
2305+
[MacCatalyst (26, 0), NoTV, Mac (26, 0), iOS (26, 0)]
2306+
[Export ("allowsParticipantsToInviteOthers")]
2307+
bool AllowsParticipantsToInviteOthers { get; set; }
2308+
2309+
[MacCatalyst (26, 0), NoTV, Mac (26, 0), iOS (26, 0)]
2310+
[Export ("allowsAccessRequests")]
2311+
bool AllowsAccessRequests { get; set; }
22562312
}
22572313

22582314
[NoTV, Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)]
@@ -2760,4 +2816,54 @@ interface CKSyncEnginePendingZoneDelete {
27602816
[Export ("initWithZoneID:")]
27612817
NativeHandle Constructor (CKRecordZoneID zoneId);
27622818
}
2819+
2820+
[MacCatalyst (26, 0), TV (26, 0), Mac (26, 0), iOS (26, 0)]
2821+
[BaseType (typeof (NSObject))]
2822+
[DisableDefaultCtor]
2823+
interface CKShareAccessRequester : NSSecureCoding, NSCopying {
2824+
[Export ("userIdentity", ArgumentSemantic.Copy)]
2825+
CKUserIdentity UserIdentity { get; }
2826+
2827+
[Export ("participantLookupInfo", ArgumentSemantic.Copy)]
2828+
CKUserIdentityLookupInfo ParticipantLookupInfo { get; }
2829+
2830+
[NoTV]
2831+
[Export ("contact", ArgumentSemantic.Copy)]
2832+
CNContact Contact { get; }
2833+
}
2834+
2835+
[MacCatalyst (26, 0), TV (26, 0), Mac (26, 0), iOS (26, 0)]
2836+
[BaseType (typeof (NSObject))]
2837+
[DisableDefaultCtor]
2838+
interface CKShareBlockedIdentity : NSSecureCoding, NSCopying {
2839+
[Export ("userIdentity", ArgumentSemantic.Copy)]
2840+
CKUserIdentity UserIdentity { get; }
2841+
2842+
[NoTV]
2843+
[Export ("contact", ArgumentSemantic.Copy)]
2844+
CNContact Contact { get; }
2845+
}
2846+
2847+
[MacCatalyst (26, 0), TV (26, 0), Mac (26, 0), iOS (26, 0)]
2848+
[BaseType (typeof (CKOperation))]
2849+
[DesignatedDefaultCtor]
2850+
interface CKShareRequestAccessOperation {
2851+
2852+
[Export ("initWithShareURLs:")]
2853+
NativeHandle Constructor (NSUrl [] shareUrls);
2854+
2855+
[NullAllowed, Export ("shareURLs", ArgumentSemantic.Copy)]
2856+
NSUrl [] ShareUrls { get; set; }
2857+
2858+
[Export ("perShareAccessRequestCompletionBlock", ArgumentSemantic.Copy)]
2859+
[NullAllowed]
2860+
CKShareRequestAccessOperationPerShareAccessRequestCompletionHandler PerShareAccessRequestCompletionBlock { get; set; }
2861+
2862+
[Export ("shareRequestAccessCompletionBlock", ArgumentSemantic.Copy)]
2863+
[NullAllowed]
2864+
CKShareRequestAccessOperationShareRequestAccessCompletionHandler ShareRequestAccessCompletionBlock { get; set; }
2865+
}
2866+
2867+
delegate void CKShareRequestAccessOperationPerShareAccessRequestCompletionHandler (NSUrl shareUrl, [NullAllowed] NSError error);
2868+
delegate void CKShareRequestAccessOperationShareRequestAccessCompletionHandler ([NullAllowed] NSError error);
27632869
}

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

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

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

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

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

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

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

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

0 commit comments

Comments
 (0)