I want to have different configuration for debug
and release
builds. All the configuration is stored inside awsconfiguration.json
, for example I have two different config files how can I set which file should be used.
When using AWSMobileClient.getInstance()
it gets default configuration from file awsconfiguration.json
Configuration file example:
{
"Version": "1.0",
"CredentialsProvider": {
"CognitoIdentity": {
"Default": {
"PoolId": "DIFFERENT_VALUES",
"Region": "DIFFERENT_VALUES"
}
}
},
"IdentityManager": {
"Default": {}
},
"CognitoUserPool": {
"Default": {
"AppClientSecret": "DIFFERENT_VALUES",
"AppClientId": "DIFFERENT_VALUES",
"PoolId": "DIFFERENT_VALUES",
"Region": "DIFFERENT_VALUES"
}
}
}
Update
There is option to use different awsconfiguration.json
by puting different files in main\res\raw
and release\res\raw
, for example by following this answer and it works.
But I'm wondering whether there is an option to do it programmatically.