サーバーを非同期で呼び出そうとしています (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);
}
しかし、サーバーからコンテンツを取得する際に問題が発生しています:- didReceiveData 関数で、次のエラーが発生しています:- 'NSString' の目に見える @interface がセレクター 'appendData' を宣言していません
誰かが私が間違っている可能性があることを教えてもらえますか?