昨天下班趁热更新了一波xcode 10,早上来发现{}折叠终于回来了,喜大普奔。
然后坑就开始来了,测试反应今天刚发的包获取不到WIFI名,自测了一下发现iOS12之前的版本都可以,还有线上的版本在iOS12系统下运行也可以。
对比了一下,发现是CNCopyCurrentNetworkInfo 方法获取不到SSID info。
最后在官网(https://developer.apple.com/documentation/systemconfiguration/1614126-cncopycurrentnetworkinfo)上找到了这么段话:
To use this function in iOS 12 and later, enable the Access WiFi Information capability for your app in Xcode. When you enable this capability, Xcode automatically adds the Access WiFi Information entitlement to your entitlements file and App ID.
配上 Access WiFi Information 就解决了。
记录个刚升级xcode时编译坑
error: unexpected duplicate task: DataModelCompile
报的重复任务,最后指向 xcdatamodeld 文件
解决方案是把 Build Phases 中 Compile Sources 中xcdatamodeld文件删掉
Thats all.