Usually under your ** - Bridging-Header.h file you need to add: (where ** is the name of your project, xcode creates it for you when you turn on target resource c)
#include <arpa/inet.h>
#include <sys/socket.h>
#include <ifaddrs.h>
After ifaddrs is available under the fast file, the file with * -Bridging-Header.h is the bridge for the c / c object class to be used in swift.
source
share