Branch.io: how to switch between live and test environment in iOS
<p>As Branch said in its docs:</p>

<blockquote>
  <p>For more advanced implementations, you may want to specify keys for
  both Test and Live environments (for example, if you are building a
  custom switch to automatically select the correct key depending on
  compiler schemes).</p>
  
  <p>Open your Info.plist file in Xcode, change the branch_key entry to a
  Dictionary, and create two subentries for your keys:</p>
</blockquote>

<p><strong>My question is</strong>: How do I build a custom switch to automatically select the correct key depending on compiler schemes? I understand I might use #if DEBUG to define the environment, but I don't understand is where do I tell branch which key it should use? Or branch will simply detect it automatically?</p>

<p>Thank you so much<img src="https://i.stack.imgur.com/9cZFb.png" alt="![screenshot of branch config in plist file"></p>