iOS 12 发布后 填的坑

1. 

项目中用到获取WiFi信息:

    BSSID = "24:69:68:98:31:2a";

    SSID = "WiFi名";

    SSIDDATA = ;

-(NSDictionary *)getWifiInfo{   

NSArray *ifs = (__bridge_transfer id)(CNCopySupportedInterfaces());

    //NSLog(@"interface %@", ifs); 

  NSDictionary *info = nil; 

  for (NSString *ifname in ifs) {       

info = (__bridge_transfer NSDictionary *)CNCopyCurrentNetworkInfo((__bridge CFStringRef)ifname);

        NSLog(@"%@ => %@",  ifname, info);

    }   

return info;

}

遇到问题:iOS 12 后 CNCopySupportedInterfaces 返回WiFi信息为空

解决方式:iOS 12 后增加了 access WiFi information 选项 需要开启

同时AppID支持下

参考:https://developer.apple.com/documentation/systemconfiguration/1614126-cncopycurrentnetworkinfo


2. 升级xcode10 后  包大了 5.3M

前后两个版本:

代码级别删除僵尸代码、及废弃的类文件

图片无增减

前后xcode 9.3.1 - 

你可能感兴趣的:(iOS 12 发布后 填的坑)