Bharat Biswal
Bharat Biswal

Reputation: 1843

Xcode11 Archive fails: no such file or directory Objects-normal/arm64/UniversalSDK.SwiftFileList

I am trying to build a universal framework from existing source code in Xcode11. When I Archive, it fails with following error:

/<unknown>:1:1: no such file or directory: '/Users/apple/SANDBOX/VoiceSampler/@/Users/apple/Library/Developer/Xcode/DerivedData/VoiceSampler-foeghskagbaeclezzbypkqnjnuos/Build/Intermediates.noindex/ArchiveIntermediates/BuildUniversalSDK/IntermediateBuildFilesPath/VoiceSampler.build/Release-iphoneos/UniversalSDK.build/Objects-normal/arm64/UniversalSDK.SwiftFileList'

/:1:1: no such file or directory: '/Users/apple/SANDBOX/VoiceSampler/@/Users/apple/Library/Developer/Xcode/DerivedData/VoiceSampler-foeghskagbaeclezzbypkqnjnuos/Build/Intermediates.noindex/ArchiveIntermediates/BuildUniversalSDK/IntermediateBuildFilesPath/VoiceSampler.build/Release-iphoneos/UniversalSDK.build/Objects-normal/arm64/UniversalSDK.SwiftFileList'

I was able to Archive the same in Xcode 10.3 earlier. Not sure what changed.

enter image description here

Please help me solve this Archive error.

Upvotes: 7

Views: 2240

Answers (2)

PedroCarvalho
PedroCarvalho

Reputation: 21

For me the issue was related with using the legacy build system instead of the new one (in Xcode 11). Once I switched to the New Build System (in File -> Workspace/Project Settings), these new lines started to appear in the build log:

WriteAuxiliaryFile /Users/.../XXXXXX.SwiftFileList (in target 'XXXX' from project 'XXX')

Upvotes: 2

Georg
Georg

Reputation: 131

I don't know if it helps, but for me it happens when I run the Swift compiler manually from inside XCode (a script which builds a separate Swift framework). XCode sets the environment variable SWIFT_RESPONSE_FILE_PATH_normal_x86_64 (variant and architecture) which points to that particular missing .SwiftFileList file. Unsetting this environmant variable solved the issue for us.

This is how we unset it in the external script:

for V in ${BUILD_VARIANTS}; do
    for A in ${ARCHS}; do
        unset SWIFT_RESPONSE_FILE_PATH_${V}_${A}
    done
done

Upvotes: 13

Related Questions