This article will tell you how to use Xcode to create a swift project, then you can develop iOS app in it. But before start, you should install Xcode in your mac os.
1. Create Swift Project In Xcode Steps.
- Start Xcode editor, then click File —> New —> Project… menu item at top menu bar, it will popup below project template dialog window. Select iOS —> Single View App template. Click Next button.
- Input iOS app product name in the next window, the product name should be camelcased. Input organization name and organization identifier. Select Swift in the Language drop down list. Click Next button.
- Now it will popup a file explorer dialog to let you select the project saved folder. You can click the New Folder button to open New Folder popup dialog, input folder name and click Create button to create the folder. And then the new folder will be selected automatically, all the project files will be saved in this folder. Then click Create button at bottom right to create the Xcode project.
- The swift xcode project will be created after some time, and you can see the project files list in left panel.
- The Main.storyboard file is where you design the iOS app UI, you can also add UI element event processor in it. The ViewController.swift file is where your swift source code located.
- Now you can read reference articles for further learning.
- iOS Swift Hello World Example
- iOS Xcode Project And Target Structure Example
- iOS Add Click Event To UIButton Swift Example
- How To Set iOS App Icon In Xcode Project
- How To Add Subview In iOS Programmatically