When trying to archive my project as a framework, by using this command
xcodebuild archive -workspace KerSDK.xcworkspace -scheme KerSDK -configuration Release -destination 'generic/platform=iOS' -archivePath './build/KerSDK.framework-iphoneos.xcarchive' SKIP_INSTALL=NO BUILD_LIBRARIES_FOR_DISTRIBUTION=YES
I'm having this error
The following build commands failed:
CompileAssetCatalog /Users/tom/Library/Developer/Xcode/DerivedData/KerSDK-aanunrytnvofyyayugyffdperjsv/Build/Intermediates.noindex/ArchiveIntermediates/KerSDK/InstallationBuildProductsLocation/usr/local/lib /Users/tom/Documents/Dev/KerClientSDK_iOS/KQTAPI/Media.xcassets (in target 'KQTAPI' from project 'KerSDK')
error: Build input file cannot be found: '/Users/tom/Library/Developer/Xcode/DerivedData/KerSDK-aanunrytnvofyyayugyffdperjsv/Build/Intermediates.noindex/ArchiveIntermediates/KerSDK/InstallationBuildProductsLocation/usr/local/lib'. Did you forget to declare this file as an output of a script phase or custom build rule which produces it? (in target 'KQTAPI' from project 'KerSDK')
The error message seems misleading as it's referring at /Users/tom/Library/Developer/Xcode/DerivedData/KerSDK-aanunrytnvofyyayugyffdperjsv/Build/Intermediates.noindex/ArchiveIntermediates/KerSDK/InstallationBuildProductsLocation/usr/local/lib
being an "input file" instead as an "output folder".
So I tried to launch the incriminated code line manually to get more informations regarding the error, but it works as a charm :
/Applications/Xcode.app/Contents/Developer/usr/bin/actool --output-format human-readable-text --notices --warnings --export-dependency-info /Users/tom/Library/Developer/Xcode/DerivedData/KerSDK-aanunrytnvofyyayugyffdperjsv/Build/Intermediates.noindex/ArchiveIntermediates/KerSDK/IntermediateBuildFilesPath/KerSDK.build/Release-iphoneos/KQTAPI.build/assetcatalog_dependencies --output-partial-info-plist /Users/tom/Library/Developer/Xcode/DerivedData/KerSDK-aanunrytnvofyyayugyffdperjsv/Build/Intermediates.noindex/ArchiveIntermediates/KerSDK/IntermediateBuildFilesPath/KerSDK.build/Release-iphoneos/KQTAPI.build/assetcatalog_generated_info.plist --compress-pngs --enable-on-demand-resources NO --development-region en --target-device iphone --target-device ipad --minimum-deployment-target 15.0 --platform iphoneos --compile /Users/tom/Library/Developer/Xcode/DerivedData/KerSDK-aanunrytnvofyyayugyffdperjsv/Build/Intermediates.noindex/ArchiveIntermediates/KerSDK/InstallationBuildProductsLocation/usr/local/lib /Users/tom/Documents/Dev/KerClientSDK_iOS/KQTAPI/Media.xcassets
/* com.apple.actool.compilation-results */
/Users/tom/Library/Developer/Xcode/DerivedData/KerSDK-aanunrytnvofyyayugyffdperjsv/Build/Intermediates.noindex/ArchiveIntermediates/KerSDK/InstallationBuildProductsLocation/usr/local/lib/Assets.car
/Users/tom/Library/Developer/Xcode/DerivedData/KerSDK-aanunrytnvofyyayugyffdperjsv/Build/Intermediates.noindex/ArchiveIntermediates/KerSDK/IntermediateBuildFilesPath/KerSDK.build/Release-iphoneos/KQTAPI.build/assetcatalog_generated_info.plist
I can't find why this actool command would work independently but not within the whole archiving process.
If someone has an idea or ever faced a similar situation, any guidance would be highly appreciated !