我搜索了这个主题,但发现很少有帮助的细节.有了这些细节,我试着按如下方式编写一些代码.
注意:请将此帖中分享的详细信息与其他帖子进行比较,然后再将其标记为DUPLICATE,而不仅仅是主题.
- (NSArray *)getDataCountersForType:(int)type {
BOOL success;
struct ifaddrs *addrs = nil;
const struct ifaddrs *cursor = nil;
const struct sockaddr_dl *dlAddr = nil;
const struct if_data *networkStatisc = nil;
int dataSent = 0;
int dataReceived = 0;
success = getifaddrs(&addrs) == 0;
if (success) {
cursor = addrs;
while (cursor != NULL) {
if (cursor->ifa_addr->sa_family == AF_LINK) {
dlAddr = (const struct sockaddr_dl *) cursor->ifa_addr;
networkStatisc = (const struct if_data *) cursor->ifa_data;
if (type == WiFi) {
dataSent …Run Code Online (Sandbox Code Playgroud) 是否有一个网站或项目记录iPhone SDK的私有API?
苹果所说的话Private APIs.如果用户包含Private APIs,用户如何测试他/她的应用程序.Apple建议用户测试应用程序的步骤有哪些Private API以及应用程序被拒绝的其他原因?
链接或教程会有所帮助.
注意:我已经使用AppScanner但是当我上传.app文件时它崩溃了.(所以它不起作用)