xcode 10 配合 iOS 12 获取不到WIFI名

        昨天下班趁热更新了一波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.

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容