-1

The following line of code is causing compile errors in my iOS application

CFStreamCreatePairWithSocketToNetService(kCFAllocatorDefault, (__bridge CFNetServiceRef)netService, &readStream, &writeStream);

If I replace the code with CFStreamCreatePairWithSocketToHost, it is working fine.

The errors are given below;

Undefined symbols for architecture i386:
"_CFStreamCreatePairWithSocketToNetService", referenced from:
  -[Connection connect] in Connection.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Can someone please help me?

Suran
  • 1,209
  • 1
  • 17
  • 21

1 Answers1

0

Actually the solution was to add CFNetwork framework to build phase. I missed it somehow.

Suran
  • 1,209
  • 1
  • 17
  • 21