I´m not able to import ifaddrs to my Swift project. The compiler says:
No such module "ifaddrs"
Aim is to get iPhones IP address in the current wifi network at the end. Any suggestions?
Normally under your file ****-Bridging-Header.h (where **** is the name of your project - xcode creates it for you when you include objective c resources) you have to add:
#include <arpa/inet.h>
#include <sys/socket.h>
#include <ifaddrs.h>
After ifaddrs is added to the bridge file, the objective c class can be used in swift.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With