This repository has been archived by the owner on Jun 4, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f3b8e4b
commit 8804dcf
Showing
11 changed files
with
107 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
// | ||
// CKAccount.swift | ||
// OpenCloudKit | ||
// | ||
// Created by Ben Johnson on 27/07/2016. | ||
// | ||
// | ||
|
||
import Foundation | ||
|
||
public enum CKAccountType { | ||
case primary | ||
case anoymous | ||
case server | ||
} | ||
|
||
public struct CKAccount: CKAccountInfoProvider { | ||
|
||
let accountType: CKAccountType | ||
|
||
var isAnonymousAccount: Bool { | ||
return accountType == .anoymous | ||
} | ||
|
||
var isServerAccount: Bool { | ||
return accountType == .server | ||
} | ||
|
||
var containerInfo: CKContainerInfo | ||
|
||
var iCloudAuthToken: String? | ||
|
||
let cloudKitAuthToken: String | ||
|
||
init(type: CKAccountType, containerInfo: CKContainerInfo, cloudKitAuthToken: String) { | ||
self.accountType = type | ||
self.containerInfo = containerInfo | ||
self.cloudKitAuthToken = cloudKitAuthToken | ||
} | ||
|
||
init(containerInfo: CKContainerInfo,cloudKitAuthToken: String, iCloudAuthToken: String) { | ||
self.accountType = .primary | ||
self.containerInfo = containerInfo | ||
self.iCloudAuthToken = iCloudAuthToken | ||
} | ||
|
||
} |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
// | ||
// CKModifyRecordsURLRequest.swift | ||
// OpenCloudKit | ||
// | ||
// Created by Ben Johnson on 27/07/2016. | ||
// | ||
// | ||
|
||
import Foundation | ||
|
||
class CKModifyRecordsURLRequest: CKURLRequest { | ||
|
||
var recordsToSave: [CKRecord]? | ||
|
||
var recordIDsToDelete: [CKRecordID]? | ||
|
||
var recordsByRecordIDs: [CKRecordID: CKRecord] = [:] | ||
|
||
var atomic: Bool = true | ||
|
||
var sendAllFields: Bool | ||
|
||
init(recordsToSave: [CKRecord], recordIDsToDelete: [CKRecordID], sendAllFields: Bool) { | ||
|
||
self.recordsToSave = recordsToSave | ||
self.recordIDsToDelete = recordIDsToDelete | ||
self.sendAllFields = sendAllFields | ||
|
||
} | ||
|
||
|
||
|
||
|
||
|
||
|
||
} |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters