XcodeGen project (Notes / NotesMac / NotesTests), Swift 6 strict concurrency, iCloud-document storage via IndieSync with a SwiftData cache, automatic capture context (location, place, time zone, device) on every note, context-based relevance ranking with a 'Right here, right now' shelf, tags, search, and the square.and.pencil-on-red app icon.
29 lines
1.1 KiB
Swift
29 lines
1.1 KiB
Swift
import SwiftUI
|
|
|
|
/// Blocking screen when the ubiquity container can't be obtained. The app
|
|
/// deliberately has no local-only fallback — notes written without iCloud
|
|
/// would exist nowhere durable and be wiped by the next cache rebuild.
|
|
struct ICloudGateView: View {
|
|
@Environment(SyncEngine.self) private var syncEngine
|
|
|
|
var body: some View {
|
|
VStack(spacing: 16) {
|
|
Image(systemName: "icloud.slash")
|
|
.font(.system(size: 56))
|
|
.foregroundStyle(.secondary)
|
|
Text("iCloud Required")
|
|
.font(.title2.bold())
|
|
Text("Notes stores everything in your iCloud Drive so it's on all your devices. Sign in to iCloud and enable iCloud Drive for Notes in Settings, then try again.")
|
|
.font(.callout)
|
|
.foregroundStyle(.secondary)
|
|
.multilineTextAlignment(.center)
|
|
.frame(maxWidth: 420)
|
|
Button("Try Again") {
|
|
Task { await syncEngine.connect() }
|
|
}
|
|
.buttonStyle(.borderedProminent)
|
|
}
|
|
.padding(32)
|
|
}
|
|
}
|