vscode支持:
- 1、支持OC、Swift开发,可实时热更新。
- 2、支持SwiftUI
vscode插件:
- Swift - Swift语法高亮
- CodeLLDB - Debug
- SweetPad - 运行iOS
命令行打开工程
vscode 输入快捷键 command+ shift +P 输入框输入 install, 弹窗下拉框 shell command install ‘code’ command in PATH 方便后续只要输入 code path/to/project
语法提示
- 快捷键 command+ shift +P 输入框输入 SweetPad:Generate
- 下拉框选择 SweetPad:Generate Build Server Config(buildServer.json)
- 快捷键 command+ shift +P 输入框输入 SweetPad:Build
- 下拉框选择 SweetPad:Build & Run(Launch) 右侧⚙齿轮可以配置为xcode快捷键 command + R
Hot Reload
- github Injectionlll
- 安装:github.com/johnno1962/… 拖到/Applications下面就是应用程序
打开配置
某个项目工程中 Build settings => Linking - General => Other Linker Flags => Debug 中value为 -Xlinker -interposable
加载Injectionlll
NSBundle * bundle = 【NSBundle bundlewithPath:@"/Applicaitons/Injectionlll.app/Contents/Resources/iOSInjection.bundle"];