linux - Swift 2 和 Linux/OS X 的区别

标签 linux swift swift2

我正在尝试将一些基本应用程序从 OS X 移植到 Linux,但似乎在 Linux 平台上连基本的东西都缺失了。是否缺少一些文档? 这是示例:

exmcast.swift:7:20: error: value of type 'String' has no member 'stringByReplacingOccurrencesOfString'
let name: String = address.stringByReplacingOccurrencesOfString(".", withString: "_")

这个简单的代码适用于 OS X。在 Linux 上 - 您会看到结果。 当没有缺少的基本信息时,很难移植任何东西。 看起来连基本的东西都不见了..

最佳答案

Swift 3 将于 2016 年秋季发布。

最近开源的 Swift 和 Linux 端口是 work in progress :

The port is still a work in progress but we’re happy to say that it is usable today for experimentation.

你可以去Swift.orggithub.com/apple并享受出色的工作。

当您发现尚未实现的内容时,您可以提交错误和/或帮助实现该功能。

open source Swift 的新版本将定期发布在 Swift.org 上。

关于linux - Swift 2 和 Linux/OS X 的区别,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34294578/

相关文章:

mysql - 在 linux 上通过命令行访问 XAMPP mysql

linux - WHM/Cpanel 和 Linux 中内存使用的不同

iOS swift Facebook AccountKit 自定义

xcode - 如何使用变量来构造命令

java - android platfrom,Dalvik字节码或 native 机器码过程中的哪种代码?

linux - 无法执行二进制文件

swift - Swift 中 "in"是什么意思?

swift - 让应用程序和服务器保持完美运行?

swift - 从 swift 调用程序集中定义的函数

ios - 适用于 iOS 的 Facebook SDK : FBSDKShareDialog is not shown