aws-amplify/amplify-swift

Question: how can I load a custom `awsconfiguration` when initializing Amplify?

vitor-neurodelabs opened this issue · 2 comments

I have two custom configs form amplify in my bundle: amplifyconfiguration.production.json and amplifyconfiguration.staging.json and they are paired with awsconfiguration.production.json and awsconfiguration.staging.json. I searched the repo trying to understand where awsconfiguration.json gets loaded but not sure where I can find it how its used.

I wanted on the call to Amplify.configure maybe to be able to pick the correct file?

Hi @vitor-neurodelabs, awsconfiguration.json is not used by Amplify, you can leave them or remove them. They are used with the AWS iOS SDK, and a legacy artifact. Calling Amplify.configure() will read amplifyconfiguration.json from the main bundle. If you have production and staging, you may want to read the files into memory and directly call Amplify.configure(config) objects. Let us know if you have more questions

This issue is now closed. Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.