建一个xcode工程。。OS X > Application > Command Line Tool因为我们只是想玩玩swift语言特性不做UI.
product name; example
org name: cyper org id: me.cyper bundle id: me.cyper.example 保存在桌面. example > example.xcodeprojexample > example/main.swift选择products>example,右边identity and type, type选择Unix-Executable可以看到生成的可执行文件的全路径
/Users/cyper/Library/Developer/Xcode/DerivedData/example-ajcwintjwwixdreqjjijwrzqriom/Build/Products/Debug/example 这个hello world文件大约5M➜ Debug $ pwd/Users/cyper/Library/Developer/Xcode/DerivedData/example-ajcwintjwwixdreqjjijwrzqriom/Build/Products/Debug➜ Debug $ lltotal 10904-rwxr-xr-x 1 cyper staff 5.3M Oct 10 20:03 exampledrwxr-xr-x 4 cyper staff 136B Oct 10 20:00 example.swiftmodule/➜ Debug $ ./exampleHello, World!➜ Debug $