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:
#define BASEURl @"http://myWebService.appspot.com/xyz/xx"then anywhere in project to use BASEURL:
NSString *LOGIN_URL= [BASEURl stringByAppendingString:@"/users/login"];
Updated: In Xcode 6 you will not find default .pch file created in your project. So please use PCH File in Xcode 6 to insert .pch file in your project.
Updates: For SWIFT
& Right away declare / define member
Example:
var STATUS_BAR_GREEN : UIColor = UIColor(red: 106/255.0, green: 161/255.0, blue: 7/255.0, alpha: 1) //