The scenario is the following:
I have an Xcode Workspace with two different Framework projects: Alpha and Beta.
Both Frameworks have Mach-O Type
equal to Static Library
.
Alpha is dependent on Beta. Beta is independent.
While creating the binaries for both libraries, Beta always succeeds in the archive process, but Alpha always fails.
xcodebuild archive \
-scheme FrameworkNameHere \
-configuration Release \
-destination 'generic/platform=iOS' \
-archivePath './build/FrameworkNameHere.framework-iphoneos.xcarchive' \
SKIP_INSTALL=NO \
BUILD_LIBRARIES_FOR_DISTRIBUTION=YES
The error message that I get when trying to create the Alpha archive using the above code (changing "FrameworkNameHere" for "Alpha") is:
The following build commands failed:
SwiftCompile normal arm64 /Users/myname/iOS-Projects/ThePathToTheFolder/Alpha/SomeAlphaFileThatImportsBeta.swift (in target 'Alpha' from project 'Alpha')
SwiftCompile normal arm64 Compiling\ SomeAlphaFileThatImportsBeta.swift /Users/myname/iOS-Projects/ThePathToTheFolder/Alpha/SomeAlphaFileThatImportsBeta.swift (in target 'Alpha' from project 'Alpha')
The file that fails is a file where I use import Beta
.
Am I trying to do something that is not possible?
How can I create a binary for Alpha?