Re: Using Configurations to build a single target for multiple platforms?
Re: Using Configurations to build a single target for multiple platforms?
- Subject: Re: Using Configurations to build a single target for multiple platforms?
- From: Alex Zavatone <email@hidden>
- Date: Mon, 18 Jan 2016 16:44:33 -0500
I'm really interested in this too, because we are going in a similar direction.
On Jan 18, 2016, at 4:12 PM, Jens Alfke wrote:
> The framework I work on needs to build for an increasing number of platforms — it’s always supported both iOS and Mac OS, but I’m in the process of adding tvOS, and I bet pretty soon some customer will want it on watchOS.
>
> I’m dealing with tvOS right now by duplicating the iOS targets and changing their SDK from iOS to tvOS. But then I also need to change their product names or build directories so they don’t overwrite each other. And there are multiple levels of dependencies, so if iOS target B depends on target A, then when I make a tvOS B I have to change its dependency to tvOS A. This is a mess and really fragile!
>
> I’m wondering if it’s feasible to make a single target support multiple platforms by using configurations. I’m used to just having configurations for Debug and Release, but in principle I could make Debug-iOS, Debug-tvOS, Debug-MacOS, etc. and override the architecture-related build settings differently in each one, right?
>
When we make our app, we make it in debug, release and ad-hoc for ad-hoc internal distribution and they all get built on the Xcode build server (when it decides it likes compiling the XIBs) for all our 3 products.
Honestly, we could simply make debug the ad-hoc build, to simplify the process.
What I do is have the app dynamically load a bundle of assets and config files based off the app's bundle name. So, essentially, we have one core app that loads what it needs depending on the app's name. Couldn't you do that with the platform or the OS version your target is geared for?
One question, if you wanted to make a single target, wouldn't that end up too fat with regards to file size? If you're on iOS, you don't want the binaries for TVOS, right?
What I do is make one target (app, not framework), set it up and then duplicate it and assign the new bundle Id and drop the assets in the build. When the app runs, everything else from there is (mostly) automatic.
> This is sounding promising, but before I spend a lot of time tinkering with my very complex project file, it’d be a great help to know if anyone else is either doing this successfully, or has tried and given up. (Or knows a completely different mechanism that works well.)
>
> Thanks!
>
> —Jens
> _______________________________________________
> 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