Reputation: 1664
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?
Upvotes: 2
Views: 478
Reputation: 1664
This is what I came up with to achieve this.
Added a run script with following.
if [ "${CONFIGURATION}" = "Debug" ]; then
/usr/libexec/PlistBuddy -c "Set :NSAppTransportSecurity:NSAllowsArbitraryLoads YES" ProjectName/Info.plist
fi
Upvotes: 3
Reputation: 119031
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.
Upvotes: 2
Reputation: 2018
Create a different plist file for the debug version and use it. This would serve your purpose I am sure.
Upvotes: 3