Michael McKenna
Michael McKenna

Reputation: 794

How do I prevent my debug build and release build from using the same Keychain data?

I currently have a debug version of my app on my device and the release version from the App Store, both have different product bundle ids where debug has “.debug” appended. They are both using the same keychain data, eg if I set the value for “email” on one, it shows up on the other. I am currently using the KeychainSwift library.

Is there anyway to separate the keychain stores between the two? Or should I just prefix the keys in the debug build with, say, “debug_”?

Upvotes: 0

Views: 517

Answers (1)

Eliseo Ocampos
Eliseo Ocampos

Reputation: 2523

You should edit your entitlements file with different values for your environments, for example: enter image description here

But that value could be "com.you.app.debug" if you are distributing your development version.

Upvotes: 2

Related Questions