This article will tell you how to use Xcode to create a swift project, then you can develop the iOS app in it. But before start, you should install Xcode on your mac os.
1. Create Swift Project In Xcode Steps.
- Start Xcode editor, then click File —> New —> Project… menu item at the top menu bar, it will popup below project template dialog window. Select iOS —> Single View App template. Click the Next button.
- Input the iOS app product name in the next window, the product name should be camel-cased. Input organization name and organization identifier. Select Swift in the Language drop-down list. Click the 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 at the bottom left corner to open the New Folder popup dialog, then input the new folder name in the New Folder dialog and click the 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 the bottom right corner to create the Xcode project.
- The swift Xcode project will be created after some time, and you can see the project files list in the left panel.
- The Main.storyboard file is where you design the iOS app UI, you can also add the UI element event processor in it. The ViewController.swift file is where your swift source code is saved and edited.
- 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