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