Where to store global constants in an iOS application?

后端 未结 11 1658
孤城傲影
孤城傲影 2020-11-28 18:01

Most of the models in my iOS app query a web server. I would like to have a configuration file storing the base URL of the server. It will look something like this:

11条回答
  •  孤城傲影
    2020-11-28 18:26

    You can also concatenate string constants like this:

      #define kBaseURL @"http://myServer.com"
      #define kFullURL kBaseURL @"/api/request"
    

提交回复
热议问题