How to copy final build after archiving to a less hidden directory (for frameworks and apps)
How to copy final build after archiving to a less hidden directory (for frameworks and apps)
- Subject: How to copy final build after archiving to a less hidden directory (for frameworks and apps)
- From: Andreas Falkenhahn <email@hidden>
- Date: Fri, 23 Dec 2016 21:24:32 +0100
So we all know that by default Xcode stores its builds in really, really
hidden directories. For example, when archiving my framework it is stored
in (*drumroll*):
/Users/andreas/Library/Developer/Xcode/DerivedData/MyTestFramework-gcjvzcxbhhtkzigvxtfgzmkbcbbn/Build/Intermediates/ArchiveIntermediates/MyTestFramework/BuildProductsPath/Release-iphoneos/MyTestFramework.framework
When building apps using such monster paths might not be a big problem
because apps show up in Xcode's Organizer but frameworks don't.
Anyway, I'd like to copy all my builds (apps and frameworks) to a central
directory, e.g. to ~/MyBuilds or something like that.
How can I do this please? I've tried to add a new "Run script" build
phase which does something like this:
PRODUCT="${BUILT_PRODUCTS_DIR}/${TARGET_NAME}.app"
cp -R "${PRODUCT}" ~/MyBuilds
This doesn't work correctly, however, because Xcode does several important
build steps *after* running this script, i.e. stripping and codesigning
is done *after* running the script. Hence, the app (or framework) copied
to the new location with this script is incomplete.
Any other ideas on how I can copy my apps and frameworks to a new location
after archiving has completed?
I know that I can change the DerivedData location in the project's setting
but I don't want to do that because doing so will also store lots of
intermediate stuff like object code in this location. I really only wish
to have my final product (either an app or a framework) copied to a new
location after archiving has finished. Nothing else, just the final
product.
How can I do this please?
--
Best regards,
Andreas Falkenhahn mailto:email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden