0

At following method the compiler is showing a warning.

buffer is a NSMutableData declared in the header file.

This is the warning message:

 Local declaration of 'data' hides instance variable

And this is the method which throws the warning:

- (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data
{
    [buffer appendData:data];
}
mvasco
  • 4,965
  • 7
  • 59
  • 120

2 Answers2

1
- (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data
{
    [buffer appendData:data];
}

your didReceiveData data type name and local instance variable name data will conflicted. because both of same name. so far you change the name of local declaration variable like

NSMutableData *localData;
codercat
  • 22,873
  • 9
  • 61
  • 85
1

The compiler is confused with which data property should use in appendData method. Make sure you only have one property with name data in that scope.

damirstuhec
  • 6,069
  • 1
  • 22
  • 39