0

I did some research and it seems this is the best library to use for socket programming in ios applications. I went to their git hub page and installed cocoa pods. I created a pod file with the lines that are stated on the installation section here https://github.com/robbiehanson/CocoaAsyncSocket/blob/master/README.markdown. I then navigated to the location of my pod file within my workspace and typed

install pod

Into the terminal and it did some things. I wasn't sure if it was successful or not as I got several different messages. I opened my project and tried to import CocoaAsyncSocket which popped an error and I don't know how to move forward. Would it be possible for someone to show a completed pod file for CocoaAsyncSocket, where it should go in the xcode project file, and maybe a small example on how to create a tcp socket with it in swift? I've looked around and can't seem to find a straightforward answer and I don't think it should be that difficult. I don't want to get discouraged.

Thanks for any help.

Ripley72
  • 1
  • 2

1 Answers1

0

For using any file created in objective-c, into swift project, you have to create bridging-header file, and import all the objective-c files you want to use into your swift project.

you can refer apple's reference guide over here: https://developer.apple.com/library/ios/documentation/Swift/Conceptual/BuildingCocoaApps/MixandMatch.html

Mehul Thakkar
  • 12,440
  • 10
  • 52
  • 81