0

I want to use GCDAsyncSocket in swift when build the project show this error

 Use of unresolved identifier 'GCDAsyncSocket'

my code is

self.socket = GCDAsyncSocket(delegate: self, delegateQueue:dispatch_get_main_queue())

I try add this to my Bridging-Header.h

#import "GCDAsyncSocket.h" // for TCP
#import "GCDAsyncUdpSocket.h" // for UDP

The above problems are solved but new problem

'GCDAsyncSocket.h' file not found

somebody say need to imported GCDAsyncSocket.framework how to import this?

linwea
  • 1
  • 2
  • a while back i used it in a project of mine, i just added the `GCDAsyncSocket.m and .h` files to my project and then put `#import "GCDAsyncSocket.h"` in the bridging header, maybe make sure the file is under your compile sources in your projects build phases? – Fonix Jun 07 '16 at 08:05
  • Where can find GCDAsyncSocket.m and .h, Can you give me a link or some advice? – linwea Jun 07 '16 at 08:32
  • https://github.com/robbiehanson/CocoaAsyncSocket/tree/master/Source/GCD – Fonix Jun 07 '16 at 08:33
  • thank you so much! – linwea Jun 07 '16 at 08:35

0 Answers0