From 4cece3373d939e5d21e6e10e18578f82c4425aaa Mon Sep 17 00:00:00 2001 From: Robbie Tilton <1269226+robbietilton@users.noreply.github.com> Date: Thu, 24 Sep 2026 09:52:57 -0700 Subject: [PATCH] Declare the PSB type in the right list and clear the remaining build warnings The com.adobe.photoshop-large-image declaration sat in CFBundleDocumentTypes instead of UTImportedTypeDeclarations, so macOS logged a missing CFBundleTypeRole and never registered the .psb type. It now sits beside the PSD declaration. TiledLayerTests unwraps its snapshot with guard: `try #require` inside the nested function warned that nothing throws, and dropping the `try` doesn't compile. CI names arm64 in its destinations so xcodebuild stops warning about multiple matches. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/verify.yml | 6 ++--- CompositorTests/TiledLayerTests.swift | 5 ++-- Config/Info.plist | 34 +++++++++++++-------------- 3 files changed, 23 insertions(+), 22 deletions(-) diff --git a/.github/workflows/verify.yml b/.github/workflows/verify.yml index becd397f..df18bb23 100644 --- a/.github/workflows/verify.yml +++ b/.github/workflows/verify.yml @@ -38,7 +38,7 @@ jobs: xcodebuild build-for-testing -project Compositor.xcodeproj -scheme Compositor - -destination 'platform=macOS' + -destination 'platform=macOS,arch=arm64' -configuration Debug -derivedDataPath DerivedData CODE_SIGN_IDENTITY=- @@ -49,7 +49,7 @@ jobs: xcodebuild test-without-building -project Compositor.xcodeproj -scheme Compositor - -destination 'platform=macOS' + -destination 'platform=macOS,arch=arm64' -derivedDataPath DerivedData -resultBundlePath ParallelResults.xcresult -parallel-testing-enabled YES @@ -62,7 +62,7 @@ jobs: xcodebuild test-without-building -project Compositor.xcodeproj -scheme Compositor - -destination 'platform=macOS' + -destination 'platform=macOS,arch=arm64' -derivedDataPath DerivedData -resultBundlePath SerialResults.xcresult -parallel-testing-enabled NO diff --git a/CompositorTests/TiledLayerTests.swift b/CompositorTests/TiledLayerTests.swift index 04904049..79a9e8ac 100644 --- a/CompositorTests/TiledLayerTests.swift +++ b/CompositorTests/TiledLayerTests.swift @@ -237,11 +237,12 @@ struct TiledLayerTests { session.brushSettings.diameter = 30 struct Snapshot { let bytes: [UInt8]; let width: Int; let height: Int; let rowBytes: Int; let samples: Int } + struct SnapshotUnavailable: Error {} func snapshot() throws -> Snapshot { view.synchronizeDisplay() - let rep = try #require(view.bitmapImageRepForCachingDisplay(in: view.bounds)) + guard let rep = view.bitmapImageRepForCachingDisplay(in: view.bounds) else { throw SnapshotUnavailable() } view.cacheDisplay(in: view.bounds, to: rep) - let data = try #require(rep.bitmapData) + guard let data = rep.bitmapData else { throw SnapshotUnavailable() } return Snapshot(bytes: Array(UnsafeBufferPointer(start: data, count: rep.bytesPerRow * rep.pixelsHigh)), width: rep.pixelsWide, height: rep.pixelsHigh, rowBytes: rep.bytesPerRow, samples: rep.bitsPerPixel / 8) } diff --git a/Config/Info.plist b/Config/Info.plist index 186a42d3..9e544fb1 100644 --- a/Config/Info.plist +++ b/Config/Info.plist @@ -37,23 +37,6 @@ LSTypeIsPackage - - UTTypeConformsTo - - public.image - - UTTypeDescription - Adobe Photoshop Large Document - UTTypeIdentifier - com.adobe.photoshop-large-image - UTTypeTagSpecification - - public.filename-extension - - psb - - - SUEnableInstallerLauncherService @@ -112,6 +95,23 @@ + + UTTypeConformsTo + + public.image + + UTTypeDescription + Adobe Photoshop Large Document + UTTypeIdentifier + com.adobe.photoshop-large-image + UTTypeTagSpecification + + public.filename-extension + + psb + + +