ios - Xcode project environment variables -


how distinguish multiple environments in ios app?

my swift app uses external api connection , have 2 api urls - testing , productive.

is there way how use 1 variable , set value testing in xcode , value appstore release?

currently using xcode 6.3.1 application deployment target ios 8.1

in swift need use "swift compiler - custom flags" instead of pre processor macro...

set flag shown in figure below enter image description here

use below code checking..

    var url;      #if debugurl         url = ** debug url **     #else         url = ** release url **     #endif 

note : add debug symbol -d debug entry.


Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -