This question is locked. New answers and comments are not allowed.
Within an Icenium project (or perhaps mobile development in general). Is there an automated way of managing configuration settings that may change between environments?
Currently our app has settings such as service URLs to point at out development environment. What we would like is to be able to choose a 'build configuration' or similar and have the app use a particular set of configuration settings. Currently we would have to manually change the app before deployment to ensure the correct settings are used.
Cheers
Aaron
Currently our app has settings such as service URLs to point at out development environment. What we would like is to be able to choose a 'build configuration' or similar and have the app use a particular set of configuration settings. Currently we would have to manually change the app before deployment to ensure the correct settings are used.
Cheers
Aaron
5 Answers, 1 is accepted
0
Hi Aaron,
Currently there is no way to handle such scenario, but it has been requested by other users as well and is logged into our backlog for investigation.
Regards,
Steve
Telerik
Do you enjoy Icenium? Vote for it as your favorite new product here (use short code H048S).
Looking for tips & tricks directly from the Icenium team? Check out our blog!
Share feedback and vote for features on our Feedback Portal.
Currently there is no way to handle such scenario, but it has been requested by other users as well and is logged into our backlog for investigation.
Regards,
Steve
Telerik
Do you enjoy Icenium? Vote for it as your favorite new product here (use short code H048S).
Looking for tips & tricks directly from the Icenium team? Check out our blog!
Share feedback and vote for features on our Feedback Portal.
0
Aaron
Top achievements
Rank 1
answered on 14 Aug 2013, 11:14 PM
Thanks Steve.
Such functionliy would be much appreciated as it would go one step closer to deployment automation.
In the interim I have implemented a simple code solution. I have a config.js file containing the following code structure (using require.js/MVVM techniques):
Such functionliy would be much appreciated as it would go one step closer to deployment automation.
In the interim I have implemented a simple code solution. I have a config.js file containing the following code structure (using require.js/MVVM techniques):
define([], function () {
devConfig =
{
serviceUrl : "https://localhost/Service.svc/"
};
testConfig =
{
serviceUrl : "https://test/Service.svc/"
};
prodConfig =
{
serviceUrl : "https://prod/Service.svc/",
};
//These setting are consistent across all environments
var serviceErrorText = "There was a problem communicating with the server. Please try again later.";
var databaseName = "myDB";
//Set this config to point to the right configuration above for the intended environment
var currentConfig = devConfig;
return {
serviceUrl: currentConfig.serviceUrl,
serviceErrorText: serviceErrorText,
databaseName: databaseName
};
});
0
Aaron, thank you for sharing your solution with the community!
Regards,
Steve
Telerik
Do you enjoy Icenium? Vote for it as your favorite new product here (use short code H048S).
Looking for tips & tricks directly from the Icenium team? Check out our blog!
Share feedback and vote for features on our Feedback Portal.
0
Ozzy
Top achievements
Rank 2
answered on 10 Feb 2014, 09:27 AM
Hi Aaron. Can you provide a small code sample of how you access these config settings in your other code.
Thanks in advance.
Ozzy
Thanks in advance.
Ozzy
0
Aaron
Top achievements
Rank 2
answered on 10 Feb 2014, 11:58 PM
Hi Ozzy
We are using require.js techniques to include scripts. Our configuration setting are kept in a file called config.js and included when required like this (the require js way):
define(["app/config"], function (config) {
//Then we can access the config properties via the included 'config' object
var myUrl = config.ServerUrl;
});
We are using require.js techniques to include scripts. Our configuration setting are kept in a file called config.js and included when required like this (the require js way):
define(["app/config"], function (config) {
//Then we can access the config properties via the included 'config' object
var myUrl = config.ServerUrl;
});