Skip to content

Commit

Permalink
[CloudKit] Add support for Xcode 15 beta 6. (#18786)
Browse files Browse the repository at this point in the history
Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com>
Co-authored-by: TJ Lambert <50846373+tj-devel709@users.noreply.github.com>
  • Loading branch information
3 people authored Aug 28, 2023
1 parent dbfebef commit 6e4ca1a
Show file tree
Hide file tree
Showing 14 changed files with 720 additions and 1,170 deletions.
26 changes: 26 additions & 0 deletions src/CloudKit/CKSyncEngineFetchChangesScope.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
using System;
using ObjCRuntime;
using Foundation;

#if !NET
using NativeHandle = System.IntPtr;
#endif

#nullable enable

namespace CloudKit {
public partial class CKSyncEngineFetchChangesScope {
public CKSyncEngineFetchChangesScope (NSSet<CKRecordZoneID>? zoneIds, bool excluded)
{
if (excluded) {
// needs to be converted to an empty set
zoneIds ??= new NSSet<CKRecordZoneID> ();
InitializeHandle (_InitWithExcludedZoneIds (zoneIds!), "initWithZoneIDs:");
} else {
// supports a null parameter
InitializeHandle (_InitWithZoneIds (zoneIds!), "initWithExcludedZoneIDs:");
}
}
}
}

25 changes: 25 additions & 0 deletions src/CloudKit/CKSyncEngineSendChangesScope.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
using System;
using ObjCRuntime;
using Foundation;

#if !NET
using NativeHandle = System.IntPtr;
#endif

#nullable enable

namespace CloudKit {
public partial class CKSyncEngineSendChangesScope {
public CKSyncEngineSendChangesScope (NSSet<CKRecordZoneID>? zoneIds, bool excluded)
{
if (excluded) {
// needs to be converted to an empty set
zoneIds ??= new NSSet<CKRecordZoneID> ();
InitializeHandle (_InitWithExcludedZoneIds (zoneIds!), "initWithZoneIDs:");
} else {
// supports a null parameter
InitializeHandle (_InitWithZoneIds (zoneIds!), "initWithExcludedZoneIDs:");
}
}
}
}
56 changes: 56 additions & 0 deletions src/CloudKit/Enums.cs
Original file line number Diff line number Diff line change
Expand Up @@ -249,4 +249,60 @@ public enum CKSharingParticipantPermissionOption : ulong {
ReadWrite = 1uL << 1,
Any = ReadOnly | ReadWrite,
}


[Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)]
[Native]
public enum CKSyncEngineAccountChangeType : long {
SignIn,
SignOut,
SwitchAccounts,
}

[Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)]
[Native]
public enum CKSyncEngineSyncReason : long {
Scheduled,
Manual,
}

[Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)]
[Native]
public enum CKSyncEngineEventType : long {
StateUpdate,
AccountChange,
FetchedDatabaseChanges,
FetchedRecordZoneChanges,
SentDatabaseChanges,
SentRecordZoneChanges,
WillFetchChanges,
WillFetchRecordZoneChanges,
DidFetchRecordZoneChanges,
DidFetchChanges,
WillSendChanges,
DidSendChanges,
}

[Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)]
[Native]
public enum CKSyncEnginePendingRecordZoneChangeType : long {
SaveRecord,
DeleteRecord,
}

[Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)]
[Native]
public enum CKSyncEngineZoneDeletionReason : long {
Deleted,
Purged,
EncryptedDataReset,
}

[Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)]
[Native]
public enum CKSyncEnginePendingDatabaseChangeType : long {
SaveZone,
DeleteZone,
}

}
Loading

1 comment on commit 6e4ca1a

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

Please sign in to comment.