Tuesday, 27 August 2013

Incompatible pointer types returning 'NSString *__strong' from a function with result type

Incompatible pointer types returning 'NSString *__strong' from a function
with result type

/Users/project/get_usr_pass.m:39:12: Incompatible pointer types returning
'NSString *__strong' from a function with result type 'get_usr_pass *'
+(get_usr_pass *)getInstance
{
@synchronized(self)
{
if(instance==nil)
{
instance= [get_usr_pass new];
NSArray *pathArray =
NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,
NSUserDomainMask, YES);
NSString *myPath = [[pathArray objectAtIndex:0]
stringByAppendingPathComponent:@"saved.plist"];
BOOL fileExists = [[NSFileManager defaultManager]
fileExistsAtPath:myPath];
if (fileExists) {
NSArray *values = [[NSArray alloc]
initWithContentsOfFile:myPath];
instance = [values objectAtIndex:1];
}
}
}
NSString *str = [[NSString stringWithFormat:@"%@", instance ] MD5];
return str;
}
Need help to fix this issue. Thanks for the time.

No comments:

Post a Comment