4

Trying to build my iOS framework from the command line, I get "MyFramework.framework.xcarchive" instead of "MyFramework.framework".

I get the proper result when building within Xcode, just not from the command line.

My command to build is really simple:

xcodebuild -project myFramework.xcodeproj -scheme myScheme -archivePath "/dev/builds" archive

Where is my '.framework' file?

1 Answer 1

5

I think you don't get build result in form of .framework because you're passing excessive archive parameter. Normally to build framework such command should work:

$ xcodebuild -project TestFramework.xcodeproj -scheme TestFramework -configuration Release -sdk macosx CONFIGURATION_BUILD_DIR=. clean build

Note that in this example build directory is current one. As a result you'll get two build flavours: TestFramework.framework and TestFramework.framework.dSYM

Sign up to request clarification or add additional context in comments.

5 Comments

Hmm. With this technique I don't get any output, not even the incorrect *.xcarchive file. Not sure if this matters, but just in case -- the command line is being executed as the sole step in a TeamCity build.
I think the issue is I want the PRODUCT, not the Archive. That's why setting "-archivePath" doesn't really help. But looking at the 'xcodebuild' documentation, I don't see a way to set the Product Output directory.
Hi @Bungles, did you find your answer?
I did find a solution eventually, but it's been so long I don't recall the details. Sorry...
@WizardofKneup, this might be what you are looking for medium.com/@german.velibekov_7849/…

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.