When I added AsyncSocket.h
and .m
to my project I got this error
Undefined symbols for architecture i386:
" _OBJC_CLASS_$_AsyncSocket", referenced from:
objc-class-ref in ViewController.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
How to fix that ?
2 steps to fix the problem :
Add CFNetwork.framework
to the project
Select AsyncSocket.m
from Xcode navigator (left side) and from inspector (right side) mark your project NAME under Target Membership section
or go to Build Phases > Link Binary With Libraries > click (+) > add AsyncSocket.m