Search code examples
iosxcodeios9app-transport-security

Xcode build configuration based app transport layer security


I have 2 build configurations as usual. Debug,Adhoc,Release. I want to disable iOS App transport layer security for Debug configuration. So basically I want to have changes in Info.plist that are different for each configuration. How Could I achieve this?


Solution

  • You can use a build script to inject details into the plist. This would use a setup like this answer to determine the build type and would use PlistBuddy to edit the plist. This is a very flexible but relatively complex solution, it allows you very fine grained control.

    The other answer about using multiple different plist files is a lot simpler but requires that you maintain multiple copies of the plist and ensure that they are updated appropriately.