I get ErrorMessage:
Automatic Reference Counting Issue
Receiver type 'NSThread' for instance message does not declare a method with selector 'initWithTarget:selector:Object:'
for this code:
NSThread *thread_Client = [[NSThread alloc] initWithTarget:self selector:@selector(myTcpClient:) Object:nil];
Why… what am I missing?
thx
The error message actually tells you what you’re missing here. It says that
NSThreadhas no such selector, which means you should look at the method signature because your issue is almost certainly is there (and in your case, it is).The error in your code is the word Object in the selector. The method signature does not use a capital O. Change that to lowercase and you’ll be fine: