Re: Installable Command Line Tool
Re: Installable Command Line Tool
- Subject: Re: Installable Command Line Tool
- From: Ken Thomases <email@hidden>
- Date: Sun, 08 Jan 2017 12:39:21 -0600
On Jan 8, 2017, at 12:23 PM, Chris Hanson <email@hidden> wrote:
On Jan 8, 2017, at 8:59 AM, Saagar Jha < email@hidden> wrote:
Some things ideas I’ve had: - Add the Command Line Tool's product to the app’s Copy Bundle Resources. This seems to be the easiest way, but it seems to be dependent on the last build I did for the Command Line Tool (i.e. if I archived the app after debugging the CLT, the unoptimized binary would be copied over)
This is probably what you'll want to do, by dragging the product reference — which is build-products relative — to the Copy Bundle Resources phase.
Except you should create a different Copy Files build phase to copy to Contents/MacOS or Contents/Helpers or another of the standard locations for code inside the app bundle.[1] Then, drag the product reference to that Copy Files build phase. It shouldn't be copied to the Resources. Because the reference is relative to the build products, it won't copy the one from the Debug directory when building the Release configuration for archiving. It'll expect there to be a built version in the Release directory.
In order to guarantee there is a built version there, you should also add a dependency on the command line tool target to you app target. That ensures you just need to build your app, and the tool will always be built first if needed.
You should also make sure "Skip Install" is turned on for the command line tool target, so when you Archive it's only built, since the app target is responsible for putting it in the right place.
Regards, Ken
|
_______________________________________________
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