在 visual studio code 中快速编码

标签 swift windows macos visual-studio

是否有可能在 Visual Studio Code(Windows 编码应用程序)中编写快速代码和预览?我在需要 ios 系统的快速编码指南中看到,但目前我只有 Windows。

我可以在 Windows 中快速编码吗?

最佳答案

是的,您可以在 Windows 上编写 Swift 代码。查看RemObjects Silver它为您提供了 Visual Studio 2015 中的 Swift 编译器。Visual Studio Express 是免费的,但我不知道它是否适用于 Silver。

Swift 本身只是一种语言。为了构建 iOS 应用程序,您需要框架,例如 Foundation 和 UITouch(可以用任何语言编写,在本例中为:C、Objective-C 和C++)。 Apple 已经开源了许多基础类并将它们移植到 Linux,但是有很多东西没有完全实现或者 Linux 中存在 OS X 中不存在的错误。没有官方的 Windows 端口。我怀疑 Apple 会完全开源 UITouch。

Silver 可以针对 .NET(我想通过扩展它的跨平台同类 Mono)、Java 或 Sugar(供应商的专有框架)。如果您想在 Windows 上使用 Swift,是的,您可以,但不要指望在 Windows 上构建 iOS 应用程序。如果您认真对待 iOS 开发,请购买 Mac,即使是 500 美元的 Mac Mini 也能发挥很大作用。如果你只想玩 Xcode,组装一个 Hackintosh 或虚拟机,这样你就可以运行 OS X。


2020 年 6 月更新:在 WWDC 2020 上,Apple 宣布 Swift 5.3将扩展以包括对 Windows 和更多 Linux 平台的支持:

Swift 5.3 is a release meant to include significant quality and performance enhancements. In addition, this release will expand the number of platforms where Swift is available and supported, notably adding support for Windows and additional Linux distributions.

在 Windows 10 上官方支持 Swift。它适用于 Visual Studio 2019(不是 VS Code)。 Install Swift on Windows

关于在 visual studio code 中快速编码,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39034225/

相关文章:

swift - 延迟更改分数

c# - 在窗体区域外绘图时如何重绘

c++ - native C++ 和 Windows 平板电脑

python - 值错误 : "too many values to unpack" when plotting with Sage

dlopen - Mac 上的 RTLD_FIRST 是否完成 Linux 上的 RTLD_DEEP_BIND 的工作?

java - 如何在 Swift 中复制这个 java 接口(interface)?

ios - 如何将数据从uitableviewcontroller发送到uitableviewcell

ios - 无法将 Objective C 文件包含到项目中?

c++ - 为什么我无法使用 CreateFile Win32 API 打开文件 RW 但可以使用 std::remove 将其删除?

macos - 默认情况下可以在紧急日志中显示调试 KEXT 符号吗?