简体   繁体   中英

How to use two different AWS ACCESS_KEY_ID & SECRET_KEY in one project

We have already used AWS ACCESS_KEY_ID & SECRET_KEY in this method

(BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {

AWSStaticCredentialsProvider *credentialsProvider = [AWSStaticCredentialsProvider credentialsWithAccessKey:ACCESS_KEY_ID secretKey:SECRET_KEY];

}

it is working perfect, but now there is a need to use another ACCESS_KEY_ID & SECRET_KEY and different Bucket (along with old ACCESS_KEY_ID & SECRET_KEY )

it could not able to run, throwing an error

Please guide us,How to use two different ACCESS_KEY_ID & SECRET_KEY and Bucket in project

-Thanks for your time.

You need to create 2 build schemes/environments. Follow this article it's very well explained. The article is for firebase but you can use it for AWS json file as well.

Multiple build environment

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM