Enable CloudKit sync for tag groups, local timeline and drafts

This commit is contained in:
Thomas Ricouard 2023-10-29 08:51:20 +01:00
parent bbce55e703
commit db64dd726e
4 changed files with 16 additions and 10 deletions

View file

@ -4,6 +4,14 @@
<dict>
<key>aps-environment</key>
<string>development</string>
<key>com.apple.developer.icloud-container-identifiers</key>
<array>
<string>iCloud.icecubesapp</string>
</array>
<key>com.apple.developer.icloud-services</key>
<array>
<string>CloudKit</string>
</array>
<key>com.apple.developer.user-fonts</key>
<array>
<string>app-usage</string>

View file

@ -3,12 +3,10 @@ import SwiftData
import SwiftUI
@Model public class Draft {
@Attribute(.unique) public var id: UUID
public var content: String
public var creationDate: Date
public var content: String = ""
public var creationDate: Date = Date()
public init(content: String) {
id = UUID()
self.content = content
creationDate = Date()
}

View file

@ -3,8 +3,8 @@ import SwiftData
import SwiftUI
@Model public class LocalTimeline {
public var instance: String
public var creationDate: Date
public var instance: String = ""
public var creationDate: Date = Date()
public init(instance: String) {
self.instance = instance

View file

@ -3,10 +3,10 @@ import SwiftData
import SwiftUI
@Model public class TagGroup: Equatable {
public var title: String
public var symbolName: String
public var tags: [String]
public var creationDate: Date
public var title: String = ""
public var symbolName: String = ""
public var tags: [String] = []
public var creationDate: Date = Date()
public init(title: String, symbolName: String, tags: [String]) {
self.title = title