'NSString'没有可见的@interface声明选择器'appendData'

cli*_*int 1 iphone xcode objective-c ios

我试图异步调用服务器(ARC -on):

NSURLConnection *theConnection=[[NSURLConnection alloc] initWithRequest:request delegate:self];

if (theConnection) {
    content = [NSMutableData data];
    NSLog(@"responseData from setup.php: %@", content);
} else {        
    // Inform the user that the connection failed.
    NSLog(@"error from server response in set up");
}

- (void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)response
{
    NSLog(@"connection did receive response");
}

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

    NSLog(@"connection did receive data");
}

- (void)connectionDidFinishLoading:(NSURLConnection *)connection
{
   NSLog(@"connection did finish load");
   NSLog(@"Succeeded! Received %@ bytes of data",receivedData);
}
Run Code Online (Sandbox Code Playgroud)

但是我从服务器获取内容时遇到问题:-在didReceiveData函数中,出现以下错误:-'NSString'没有可见的@interface声明选择器'appendData'

有人可以建议我哪里我错了吗?

App*_*ate 5

在接口部分的.h文件中,请声明以下内容

NSMutableData *content;
Run Code Online (Sandbox Code Playgroud)