How do I configure full URLs in xcconfig files

atreat picture atreat · Jan 23, 2014 · Viewed 10.8k times · Source

I have an xcconfig file which contains a configuration for which server my app should hit. In debug mode, this will be a different server than for release builds.

The problem I have is that a URL of the form http://www.stackoverflow.com is treated as a comment after the double slash. So the string I get in code is 'http:'

I have read that I can put a -traditional build flag on Info.plist, I was wondering if someone else has had a similar issue and has solved it?

Thanks.

Answer

David H picture David H · Mar 30, 2016

Here's a simple workaround:

WEBSITE_URL = https:/$()/www.example.com