Re: Runtime lookup of build variables ...
Re: Runtime lookup of build variables ...
- Subject: Re: Runtime lookup of build variables ...
- From: Kyle Sluder <email@hidden>
- Date: Thu, 20 Mar 2014 12:13:31 -0700
On Thu, Mar 20, 2014, at 11:38 AM, Luther Baker wrote:
> Lets say I've written a networking engine shared amongst multiple
> projects.
> For convenience, the networking engine's SDK requires paths and payloads
> but AUTOMATICALLY determines the hostname.
>
> The hostname is a function of the "environment" that the application is
> targeting. Note that this is the core problem I am attempting to solve
> here
> - and feel free to suggest I go about this a different way.
If you're going to have a staging environment, it would seem appropriate
to have the staging code be _exactly_ what will be pushed to production.
Likewise for Test. Therefore I'd be very hesitant to use different
configurations for each—it's multiplies the opportunity for settings to
get out of sync.
Rather, I'd have the app determine its environment by reading some sort
of external configuration file, and have setting up that configuration
file be part of the _deployment_ process. If it's not set, the app fails
to launch.
--Kyle Sluder
_______________________________________________
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