I have created a class AuthService
in AuthService declaration I have this
- (MSClient *) getClient;
- (MSClient *) getClient{
client =[MSClient clientWithApplicationURLString:@"XXXXXXX/"
applicationKey:@"XXXXXXX"];
return client;
}
@property (strong, nonatomic) AuthService *authService;
@synthesize client;
client = [authService getClient];
nil
Declaring a property does not initialize it. So this line,
@property (strong, nonatomic) AuthService *authService;
doesn't create an instance of AuthService, you need to alloc init one before you can call getClient.