微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

swift笔记三 使用xcode

一个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.xcodeproj
example > 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  $ ll
total 10904
-rwxr-xr-x  1 cyper  staff   5.3M Oct 10 20:03 example
drwxr-xr-x  4 cyper  staff   136B Oct 10 20:00 example.swiftmodule/
➜  Debug  $ ./example
Hello,World!
➜  Debug  $

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。

相关推荐