panicinc / icarus

Swift, C, C++, and Objective-C Support for Nova
MIT License
69 stars 4 forks source link

iOS Projects? #5

Open terhechte opened 11 months ago

terhechte commented 11 months ago

I've read the Readme and the plugin description but I'm none the wiser. Is it possible to use icarus in lieu of Xcode for doing iOS development (given that the iOS project is a pure SPM project)? Or can Icarus only be used with Swift non-app Swift SPM projects?

logancollins commented 11 months ago

If the iOS project is using SwiftPM, then sort of. If it's only using an Xcode project, then not really, since Apple's SourceKit-LSP does not currently support Xcode projects. For an iOS project using SwiftPM, code editing, autocomplete, etc. should work just as it were for a standard, CLI or server-side Swift project.

Building can also always be accomplished using either swift build or xcodebuild and a custom build phase script.

However, there is no facility to deploy an app onto a device (especially with SwiftPM projects). Device and simulator hooks are entirely in the domain of Xcode. The simctl utility can do it for simulators, but I haven't yet been able to get it to work with any sort of SwiftPM project, only Xcode projects.

For the most part, since SwiftPM + iOS is sort of nebulous right now, mixed with the inability to do things like edit XIBs and preview SwiftUI (both very much reserved by Xcode) Icarus isn't really targeting rich iOS support at the moment. That might change, as SwiftPM evolves some more (I saw some talk recently about the private .iOSApplication target type that was added for Swift Playgrounds, so hopefully it makes it into the publically documented SPM APIs).

Oh, and I'm forever not quite on the bleeding edge of what's going on with iOS development (I'm mostly Mac and Linux), so if there is cool stuff happening we could hook into, don't hesitate to mention it!

terhechte commented 11 months ago

Thanks! I might give it a try. I don't care about building, running on device, or SwiftUI previews anyway. These are things Xcode can handle well enough. What Xcode can't do is being a reasonably good code editor, so because Icarus allows me to have better vim bindings than Xcode and use GitHub copilot it is already much better at Xcode for the actual coding part :)