It's been 10 years since I used an IDE to code in, favouring editors like Textmate, Sublime and VSCode. I see that there's GitHub - apple/sourcekit-lsp: Language Server Protocol implementation for Swift and C-based languages which makes it possible to write code in VSCode (at least that's the intention - I haven't tried it to see how far along it is yet). Assuming that I could use that is there any way to run ios projects without using xcode? Is it possible to build the project and launch it in a simulator or on a device from the command line?

It depends on what you mean by “without Xcode”. If you mean “without having to launch Xcode.app” then yes - you can use the xcodebuild command. If on the other hand you mean “without having Xcode installed on the machine” then I believe the answer is no.

2 Likes

ah, I wasn't aware of xcodebuild! No I don't any desire to rid my machine of xcode, just looking for a faster way to work so xcodebuild seems like exactly what I'm looking for.

edit: note for anyone else looking for similar, there's a man page for xcodebuild which is pretty comprehensive.

1 Like

For launching from command line you can consider simctl. There is no man page for it afaik, but xcrun simctl help is a good place to start.

1 Like

simctl looks like what I need, and I found this great article introductory article simctl - NSHipster

1 Like

Took a little fiddling but I've got the app building and deploying to a simulator from the command line :smile: For reference I found this article which was also very helpful simctl: Control iOS Simulators from Command Line | by Shashikant Jagtap | XCBlog | Medium .

2 Likes

@opsb take a look at this example: GitHub - markst/hotreloading-vscode-ios: Demonstrating iOS development environment in VSCode using XcodeGen + HotReloading.

1 Like