In my project I am working on it since last 6 months , i was using #define to define all URL in a FileManager class.but Now I came to know that I have to use two different URL depend on condition so dynamically I can not change #define values.so I decided to Use extern variables in FileManager class instead of #define.
as in interface file
extern NSString *Url;
extern NSString *loginUrl;
in m file
@implementation UrlManager
+ (void) initialize{
Url=@"http://xxxxxxxxxx.com";
loginUrl=[NSString stringWithFormat:@"%@%@",Url,@"/ipad.php?method=audLogin&username="];
}
but when I am importing URLManager.h , and using loginUrl, still its null , please help me how can I initialize extern variables so that I can use these in app.