The pasteboard UTType constants become edition twins — Pro stops claiming ownership it doesn't have
Latent since the m7 split: base's Info.plist exports the three family pasteboard types (cards, lanes, clipboard) and Pro's imports them, but the shared constants declared all three UTType(exportedAs:) — a claim of ownership the system checks against the running app's plist. In Pro that claim is false, and the first touch (the clipboard type, via the launch sweep) raised a runtime fault that blocked board loading under the debugger. EditionAbout's twin-file pattern, applied to an initializer: the constants move to Kanban/App/EditionTypes.swift (exportedAs) with a KanbanPro/Edition/EditionTypes.swift twin (importedAs, identifiers verbatim); project.yml excludes base's copy from Pro. Type identity is the string, so payloads cross editions unchanged. Verified: Pro fixture launch opens the board with zero UTI warnings; both suites green; verify-editions 30/30. Claude-Session: https://claude.ai/code/session_01SR4XGjmBE16ZUYWpfFHXwY
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
import Foundation
|
||||
import UniformTypeIdentifiers
|
||||
|
||||
// MARK: - The family pasteboard types, as Pro declares them
|
||||
|
||||
/// **Pro's half of the edition UTI posture** — the twin of base's `Kanban/App/EditionTypes.swift`,
|
||||
/// which owns the full story (12-editions.md ▸ Targets: base *exports* the family types, Pro
|
||||
/// *imports* them). `UTType(importedAs:)` is the initializer that matches Pro's
|
||||
/// `UTImportedTypeDeclarations`; the identifiers and their `public.data` conformance are verbatim
|
||||
/// base's, so a payload written by one edition reads in the other by type identity alone.
|
||||
extension UTType {
|
||||
|
||||
/// A drag carrying board **cards** — see `DragPayload`.
|
||||
static let laneworkCards = UTType(importedAs: "dev.rzen.indie.kanban.cards")
|
||||
|
||||
/// A drag carrying board **lanes** — see `DragPayload`.
|
||||
static let laneworkLanes = UTType(importedAs: "dev.rzen.indie.kanban.lanes")
|
||||
|
||||
/// A Lanework copy's pasteboard manifest — see `ClipboardManifest`.
|
||||
static let laneworkClipboard = UTType(importedAs: "dev.rzen.indie.kanban.clipboard")
|
||||
}
|
||||
Reference in New Issue
Block a user