This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
+ (MyClass *)sharedInstance | |
{ | |
// Static local predicate must be initialized to 0 | |
static MyClass *sharedInstance = nil; | |
static dispatch_once_t onceToken = 0; | |
dispatch_once(&onceToken, ^{ | |
sharedInstance = [[MyClass alloc] init]; | |
// Do any other initialisation stuff here | |
}); | |
return sharedInstance; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RKLogConfigureByName("RestKit/Network", RKLogLevelTrace); | |
RKLogConfigureByName("RestKit/ObjectMapping", RKLogLevelTrace); | |
//NSString *url = @"http://0.0.0.0:5001/"; | |
NSString *url = @"https://asteroids-nemesis.herokuapp.com/"; | |
NSURL *baseURL = [NSURL URLWithString:url]; | |
AFHTTPClient * client = [AFHTTPClient clientWithBaseURL:baseURL]; | |
[client setDefaultHeader:@"Accept" value:RKMIMETypeJSON]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RKLogConfigureByName("RestKit/Network", RKLogLevelTrace); | |
RKLogConfigureByName("RestKit/ObjectMapping", RKLogLevelTrace); | |
//NSString *url = @"http://0.0.0.0:5001/"; | |
NSString *url = @"https://asteroids-nemesis.herokuapp.com/"; | |
NSURL *baseURL = [NSURL URLWithString:url]; | |
AFHTTPClient * client = [AFHTTPClient clientWithBaseURL:baseURL]; | |
[client setDefaultHeader:@"Accept" value:RKMIMETypeJSON]; |