You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The LuxTTS G2P resources are currently copied as a top-level directory named Resources. In iOS resource bundles, Apple code signing interprets that reserved layout as a malformed legacy bundle and fails with bundle format unrecognized, invalid, or unsuitable. This prevents any signed iOS consumer build from using current FluidAudio main.
This change lets SwiftPM process the production and test resources into their bundle roots and updates the corresponding lookups. The resource contents and LuxTTS behavior are unchanged. A manifest comment and regression test protect the signing-sensitive layout from being reverted to .copy.
Validation
Changed-file swift format lint: clean; repository-wide lint exits 0 with existing warnings
Clean swift test --filter LuxTts: 33 tests executed, 1 model-gated test skipped, 0 failures
Full swift test --parallel --num-workers 8: exited 0 across 2,111 XCTest cases and 45 Swift Testing cases
Signed generic iOS FluidAudio scheme build: passed
Generated iOS production and test resource bundles contain their files at the bundle root and no nested Resources directory
codesign --verify --strict passed for both generated iOS resource bundles
The test target has the same latent issue. Package.swift line 69 still declares .copy("TTS/LuxTts/Resources") with matching subdirectory: "Resources" lookups in Tests/FluidAudioTests/TTS/LuxTts/LuxTtsFixtures.swift. That's the exact reserved-Resources layout this PR removes from the library target, it would hit the same CodeSign rejection if the test bundle is ever signed for device, and more importantly it's the in-repo example a future contributor will copy when adding bundled resources. Could you switch it to .process + drop the subdirectory: argument (or rename the directory) in this PR?
Add a one-line comment at the .process declaration noting that .copy of a Resources-named directory breaks Apple code signing on iOS. The constraint is invisible to every check we run — swift build, swift test, and CI (macOS-only tests, unsigned iOS build) all pass with either spelling — so without a comment, a revert-to-.copy "cleanup" would only surface in a downstream consumer's signed build.
Thanks — both findings were correct. I pushed follow-up commit 4ddcfbc.
The FluidAudioTests target now uses .process("TTS/LuxTts/Resources"), and LuxTtsFixtures resolves fixtures from the bundle root with no subdirectory: "Resources" assumption.
The production .process declaration now has the requested one-line warning explaining that copying a directory named Resources breaks iOS code signing.
I also added testFixtureResourcesAreProcessedAtBundleRoot to pin the actual bundle contract. Before the manifest fix, it failed because the generated test bundle contained a nested Resources directory and no root-level fixture. From a clean build after the fix, it passes and verifies both the absence of that directory and the root-level fixture.
Validation on the pushed head:
changed-file swift format lint: clean; repository-wide lint exits 0 with existing warnings
full swift test --parallel --num-workers 8: exited 0 across 2,111 XCTest cases and 45 Swift Testing cases
signed generic iOS FluidAudio scheme build: passed
generated iOS production and test resource bundles are flat and signed by Team 672Q5SQPSB
codesign --verify --strict passed for both bundles
For completeness, the package-wide generic-iOS build-for-testing signs the fixed test resource bundle successfully, then the overall FluidAudio-Package scheme stops on the existing intentional #error("FluidAudioCLI is only supported on macOS") because that aggregate scheme also includes the CLI. The supported FluidAudio iOS scheme is green.
Ready for re-review. Thanks for catching the mirrored test-target layout and the missing maintenance guard.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why is this change needed?
The LuxTTS G2P resources are currently copied as a top-level directory named
Resources. In iOS resource bundles, Apple code signing interprets that reserved layout as a malformed legacy bundle and fails withbundle format unrecognized, invalid, or unsuitable. This prevents any signed iOS consumer build from using current FluidAudiomain.This change lets SwiftPM process the production and test resources into their bundle roots and updates the corresponding lookups. The resource contents and LuxTTS behavior are unchanged. A manifest comment and regression test protect the signing-sensitive layout from being reverted to
.copy.Validation
swift format lint: clean; repository-wide lint exits 0 with existing warningsswift test --filter LuxTts: 33 tests executed, 1 model-gated test skipped, 0 failuresswift test --parallel --num-workers 8: exited 0 across 2,111 XCTest cases and 45 Swift Testing casesFluidAudioscheme build: passedResourcesdirectorycodesign --verify --strictpassed for both generated iOS resource bundles