1、使用xcode9创建swift语言的第一个程序hello world

1、打开xocde,创建一个工程,如下图所示:

1、使用xcode9创建swift语言的第一个程序hello world

2、选择macOs中的Command Line Tool项目,然后点击next,如下图所示:

1、使用xcode9创建swift语言的第一个程序hello world

3、输入Product Name的名称,Organization Identifier的名称,点击Next,如下图所示:

1、使用xcode9创建swift语言的第一个程序hello world

4、然后选择保存工程的路径。

5、创建之后已经存在一个main.swift文件,如下图所示:

1、使用xcode9创建swift语言的第一个程序hello world

6、点击右三角运行,如下图所示:

1、使用xcode9创建swift语言的第一个程序hello world

7、运行成功之后就会在下边输出Hello,world!,如下图所示:

1、使用xcode9创建swift语言的第一个程序hello world