Skip to content

Commit 2b05215

Browse files
committed
[CloudKit] Update to Xcode 26 beta 1-5.
1 parent 704b154 commit 2b05215

File tree

6 files changed

+123
-139
lines changed

6 files changed

+123
-139
lines changed

src/CloudKit/Enums.cs

Lines changed: 10 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,11 @@ 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+
{
404+
Record,
405+
Zone,
406+
}
397407
}

src/cloudkit.cs

Lines changed: 113 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)]
@@ -1785,6 +1829,10 @@ interface CKRecordZone : NSSecureCoding, NSCopying {
17851829
[TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)]
17861830
[NullAllowed, Export ("share", ArgumentSemantic.Copy)]
17871831
CKReference Share { get; }
1832+
1833+
[MacCatalyst (26, 0), TV (26, 0), Mac (26, 0), iOS (26, 0)]
1834+
[Export ("encryptionScope", ArgumentSemantic.Assign)]
1835+
CKRecordZoneEncryptionScope EncryptionScope { get; set; }
17881836
}
17891837

17901838
[MacCatalyst (13, 1)]
@@ -2259,6 +2307,14 @@ interface CKAllowedSharingOptions : NSSecureCoding, NSCopying {
22592307
[Static]
22602308
[Export ("standardOptions", ArgumentSemantic.Strong)]
22612309
CKAllowedSharingOptions StandardOptions { get; }
2310+
2311+
[MacCatalyst (26, 0), NoTV, Mac (26, 0), iOS (26, 0)]
2312+
[Export ("allowsParticipantsToInviteOthers")]
2313+
bool AllowsParticipantsToInviteOthers { get; set; }
2314+
2315+
[MacCatalyst (26, 0), NoTV, Mac (26, 0), iOS (26, 0)]
2316+
[Export ("allowsAccessRequests")]
2317+
bool AllowsAccessRequests { get; set; }
22622318
}
22632319

22642320
[NoTV, Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)]
@@ -2766,4 +2822,60 @@ interface CKSyncEnginePendingZoneDelete {
27662822
[Export ("initWithZoneID:")]
27672823
NativeHandle Constructor (CKRecordZoneID zoneId);
27682824
}
2825+
2826+
[MacCatalyst (26, 0), TV (26, 0), Mac (26, 0), iOS (26, 0)]
2827+
[BaseType (typeof (NSObject))]
2828+
[DisableDefaultCtor]
2829+
interface CKShareAccessRequester : NSSecureCoding, NSCopying
2830+
{
2831+
[Export ("userIdentity", ArgumentSemantic.Copy)]
2832+
CKUserIdentity UserIdentity { get; }
2833+
2834+
[Export ("participantLookupInfo", ArgumentSemantic.Copy)]
2835+
CKUserIdentityLookupInfo ParticipantLookupInfo { get; }
2836+
2837+
[NoTV]
2838+
[Export ("contact", ArgumentSemantic.Copy)]
2839+
CNContact Contact { get; }
2840+
}
2841+
2842+
[MacCatalyst (26, 0), TV (26, 0), Mac (26, 0), iOS (26, 0)]
2843+
[BaseType (typeof(NSObject))]
2844+
[DisableDefaultCtor]
2845+
interface CKShareBlockedIdentity : NSSecureCoding, NSCopying
2846+
{
2847+
[Export ("userIdentity", ArgumentSemantic.Copy)]
2848+
CKUserIdentity UserIdentity { get; }
2849+
2850+
[NoTV]
2851+
[Export ("contact", ArgumentSemantic.Copy)]
2852+
CNContact Contact { get; }
2853+
}
2854+
2855+
[MacCatalyst (26, 0), TV (26, 0), Mac (26, 0), iOS (26, 0)]
2856+
[BaseType (typeof (CKOperation))]
2857+
[DisableDefaultCtor]
2858+
interface CKShareRequestAccessOperation
2859+
{
2860+
[DesignatedInitializer]
2861+
[Export ("init")]
2862+
NativeHandle Constructor ();
2863+
2864+
[Export ("initWithShareURLs:")]
2865+
NativeHandle Constructor (NSUrl[] shareUrls);
2866+
2867+
[NullAllowed, Export ("shareURLs", ArgumentSemantic.Copy)]
2868+
NSUrl[] ShareUrls { get; set; }
2869+
2870+
[Export ("perShareAccessRequestCompletionBlock", ArgumentSemantic.Copy)]
2871+
[NullAllowed]
2872+
CKShareRequestAccessOperationPerShareAccessRequestCompletionHandler PerShareAccessRequestCompletionBlock { get; set; }
2873+
2874+
[Export ("shareRequestAccessCompletionBlock", ArgumentSemantic.Copy)]
2875+
[NullAllowed]
2876+
CKShareRequestAccessOperationShareRequestAccessCompletionHandler ShareRequestAccessCompletionBlock { get; set; }
2877+
}
2878+
2879+
delegate void CKShareRequestAccessOperationPerShareAccessRequestCompletionHandler (NSUrl shareUrl, [NullAllowed] NSError error);
2880+
delegate void CKShareRequestAccessOperationShareRequestAccessCompletionHandler ([NullAllowed] NSError error);
27692881
}

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)