Skip to content

Ensembles 3.0.1

Latest

Choose a tag to compare

@drewmccormack drewmccormack released this 26 Jun 20:49
  • Fix the tvOS build with current Swift toolchains. Newer Swift toolchains (6.4 / Xcode 27) enforce tvOS API availability that older ones let slide, surfacing two latent issues at the package's tvOS 15 target. First, ASWebAuthenticationSession requires tvOS 16 and ASWebAuthenticationPresentationContextProviding is unavailable on tvOS, but the shared web-authentication helper (and the Google Drive, OneDrive, and pCloud authenticators) guarded interactive OAuth only against watchOS; the guard now also excludes tvOS, which has no usable web-auth presentation surface. Second, CKSubscription.NotificationInfo.alertBody is unavailable on tvOS but was set unconditionally when subscribing for CloudKit push notifications; that assignment is now guarded (silent background delivery is unaffected — it is driven by shouldSendContentAvailable). tvOS keeps the full SDK and all sync; only the interactive OAuth sign-in UI for those three backends is unavailable there, as it was in practice already.
  • Fix external data files (such as images) being lost during rebasing and baseline consolidation. Large attribute values are stored outside the event database as files, tracked by a separate data_files index. The index must be re-synced whenever an object change's property changes are written, otherwise removeUnreferencedDataFiles() treats the file as orphaned and deletes it. EventBuilder and the consolidator's reinsert path did this, but Rebaser (all merge branches) and BaselineConsolidator's merge-into-existing path did not. When a baseline was rebased or two baselines were consolidated, an object that gained or carried a data-file-backed attribute could have its property changes merged while its data_files entries were left stale, so the file was later garbage-collected and the attribute came back empty. Both Rebaser.mergeChange and BaselineConsolidator now call syncDataFiles after merging property changes. This is a regression introduced by the Ensembles 3 rewrite: in Ensembles 2 the data-file index was a Core Data relationship rebuilt automatically inside CDEObjectChange's property-change setter, so it could never go stale; Ensembles 3's raw-SQLite event store made re-syncing the index an explicit, separate call that these two merge paths omitted. Reported by Ernst. Regression tests cover rebasing and consolidation, asserting the file survives the unreferenced-file cleanup.