首页 > swift 获取当前ip
网上搜了一段代码,但是没打印出来ip
println(getIFAddresses())
前提是你需要在桥接头文件里加上这句 #include <ifaddrs.h>
#include <ifaddrs.h>