Xcode support windows

Why can't Apple makes the development more friendly? Why Can't they. If they can, its going to make me more easier to code. I know that the Swift can support on the Ipad Pro but then the function is less than the Mac os and I only have an I mac, can't carry out, so i hope that the Swift can convert their programing app into Windows, this can increase more developer.

Thanks for helping !

I'm not sure if you are asking for Xcode to run on Windows (as the title suggests) or Swift to run on Windows (as your post content suggests).

Swift already runs on Windows for the most part. @compnerd has been making huge strides into making that possible and you can find instructions on how to build Swift on Windows here: swift/WindowsBuild.md at main · apple/swift · GitHub

I'm pretty sure Xcode will never come to Windows, but that doesn't mean that Swift programming support won't be supported in other code editors. Huge strides have been made into language server protocol support for swift which will allow you to write Swift code with syntax highlighting, code completion etc in programs like Visual Studio Code, Vim, etc. You can find out more details here: GitHub - apple/sourcekit-lsp: Language Server Protocol implementation for Swift and C-based languages

5 Likes

Thank You

A quick note regarding Sourcekit-LSP. I haven't really worked with it on Windows, however i use it daily to write Swift on Linux with VSCode, and even though there are still some things missing etc. It's still a very pleasant experience, so it's definitely possible to use Sourcekit-LSP.

There is also a browser based IDE, where you run your project through Docker that spins up a Linux container, so you can develop Swift in your browser, if you can't make it work native on Windows, it's a fork of VSCode so it gives quite a good foundation to at least get started :)

1 Like

I think that the biggest things really in the way of getting SourceKit-LSP building on Windows is primarily the s-p-m dependency. Nearly all the other pieces are ready to go (libdispatch, SourceKit, swift, IndexDB, Foundation). It really is a matter of just switching to CMake and it should be within reach. I imagine that we should be able to get there soon (though, more hands would speed it up)

3 Likes

@compnerd i have never really used Windows, but just have to say, i am really impressed with the work you have put in making Swift work on Windows :) .. Really nice work

1 Like

@compnerd Would it be possible to provide experimental Windows builds (Swift, Foundation, Swift Package Manager) at Swift.org - Download Swift? I'd love to give it a quick try but am hesitant about the 22-step-build at swift/WindowsBuild.md at main · apple/swift · GitHub and don't seem to be able to follow the instructions at Azure DevOps Services | Sign In (Point 2; there is no Pipelines -> builds button).

@gonsolo, sorry, I cannot provide the downloads from swift.org; There are nightlies that are available on Azure. I welcome patches to improve the instructions.

Azure DevOps Services | Sign In is the main page and will give you a quick link to where to go.

If you click on the status for the Windows Toolchain (x64 (VS2019)), it should take you to the last build, which has the “artifacts” (click on 1 published). If you select the artifact name, there will be a download button on the right.

Similarly on the Windows SDK, you should be able to download the last build. That should have all the pieces that you need (compiler, runtime/standard library, libdispatch, Foundation).

swift-package-manager is a long way away given that it is not particularly portable code. There is work going on to enable that, but, even the llbuild build is currently broken on Windows :-(.

Hi again!

https://dev.azure.com/compnerd/windows-swift is the main page and will give you a quick link to where to go.

If you click on the status for the Windows Toolchain (x64 (VS2019)), it should take you to the last build, which has the “artifacts” (click on 1 published). If you select the artifact name, there will be a download button on the right.

I was able to compile a tiny program but running it ends with "api-ms-win-crt-heap-l1-1-0.dll: cannot open shared object file: No such file or directory". I am on Windows 10. Is this expected?

Greetings,

g

I was able to compile a tiny program but running it ends with "api-ms-win-crt-heap-l1-1-0.dll: cannot open shared object file: No such file or directory". I am on Windows 10. Is this expected?

Nevermind, I was trying to run it from a bash shell. When clicking on
it in the Explorer it complained about missing icuuc64.dll. After
downloading this dependency and copying dlls into the right directory
it worked.

Greetings,
g

Hi!

If you click on the status for the Windows Toolchain (x64 (VS2019)), it should take you to the last build, which has the “artifacts” (click on 1 published). If you select the artifact name, there will be a download button on the right.

Ok, thanks.

swift-package-manager is a long way away given that it is not particularly portable code. There is work going on to enable that, but, even the llbuild build is currently broken on Windows :-(.

Does that mean that "20. Build llbuild" and "21. Build swift-package-manager" at WindowsBuild.md are not working?

Regards,

g

Unfortunately, yes, steps 20 and 21 do not currently work without additional work. I've not yet gotten back around to the llbuild and s-p-m patches. Though, swift-package-manager needs quite a bit work still (e.g static libraries do not yet work on Windows, but swift-package-manager tries to build itself using static libraries). It was far more convenient to have the rules so that the build could be replicated later though.