Re: building with different assets/strings
Re: building with different assets/strings
- Subject: Re: building with different assets/strings
- From: Alex Zavatone <email@hidden>
- Date: Fri, 28 Apr 2017 17:44:55 -0500
Make two different targets.
Abstract the swappable parts of your project into what I call "Product Specific Assets" and make sure that you dynamically load the stuff you need from the proper folder within that folder and use the CFExecutableName as the name of the folder you put your target specific assets within.
You can also link to entitlements, info.plists, other build settings relative to those folders, but you'll need to use something like $(PRODUCT_NAME) in your build settings where you specify that file.
Then when it's all done, you just duplicate your target, name it what you want, create another folder with that name, put the new stuff in there and like magic, everything is swapped.
The product's name is the pointer to the assets and config files. Works well.
On Apr 13, 2017, at 6:16 AM, Torsten Curdt wrote:
> Hey there,
>
> I have a project that I want to create two different products from.
> The only thing that changes with the build are the strings files and the xcassets catalog.
>
> I guess I could make it two different "Targets" but that means I need to keep "Copy Bundle Resources" manually in sync.
>
> Could anyone think of a better way of doing this?
>
> Maybe with some xconfig magic? Or with a variable in the path to the resources somehow - Xcode seems to let me only pick the file.
>
> cheers,
> Torsten
> _______________________________________________
> 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
_______________________________________________
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