1. 由于Switf 3.0的引入,导致Socket.IO-Client-Swift编译报错
1)cocopods升级:pod repo update
2)导入8.0.2版本的Socket.IO
2. 编译提示”Use Legacy Swift Language Version” (SWIFT_VERSION) is required to be configured correctly for targets which use Swift. Use the [Edit > Convert > To Current Swift Syntax…] menu to choose a Swift version or use the Build Settings editor to configure the build setting directly."
podfile末尾添加如下代码:
post_installdo|installer|
installer.pods_project.targets.eachdo|target|
target.build_configurations.eachdo|config|
config.build_settings['SWIFT_VERSION'] ='3.0'
end
end
end
3. 代码编辑xcode崩溃
插件儿问题,终端输入defaults delete com.apple.dt.Xcode DVTPlugInManagerNonApplePlugIns-Xcode-8.0清除插件即可
4. 工程编译出现一堆nw_socket_handle_socket_event错误
Edit Scheme->Run->Environment Variables添加OS_ACTIVITY_MODE=disable