Closed sunshineLixun closed 2 weeks ago
Have Cursor on the left on top of Xcode with only previews showing; any changes made in Cursor after saving will be reflected in previews.
For easily running on a simulator, use keyboard bindings. Here is an example:
[
{
"key": "ctrl+alt+cmd+b",
"command": "workbench.action.toggleSidebarVisibility"
},
{
"key": "cmd+b",
"command": "-workbench.action.toggleSidebarVisibility"
},
{
"key": "cmd+b",
"command": "runCommands",
"args": {
"commands": [
{
"command": "workbench.action.tasks.terminate",
"args": "terminateAll"
},
{
"command": "workbench.action.tasks.runTask",
"args": "sweetpad: build"
}
]
}
},
{
"key": "ctrl+cmd+r",
"command": "runCommands",
"args": {
"commands": [
{
"command": "workbench.action.tasks.terminate",
"args": "terminateAll"
},
{
"command": "sweetpad.build.launch"
}
]
}
},
{
"key": "cmd+.",
"command": "runCommands",
"args": {
"commands": [
{
"command": "workbench.action.terminal.killAll"
}
]
},
"when": "inDebugMode || taskRunning"
}
]
I hope that will greatly improve development efficiency!
Thank you for your reply. I found this library: https://github.com/krzysztofzablocki/Inject which can hot reload SwiftUI. With your sweetpad, the development experience is greatly improved. Thank you for your work.
All credits for Sweetpad goes to @hyzyla!
Thank you for developing this plugin, I like it very much. In practice, I encountered a bad experience: every time I modify the code, I have to go back to XCode to execute Common + R and re-run the simulator. Is there a better way to solve this experience problem, or can it support XCode Canvas Preview hot reload? Although this is indeed a bit difficult, it can greatly improve development efficiency. Thank you.