Here's a step-by-step guide on how to clone and run a Swift app from a Git repository. This guide assumes you are familiar with using Git and have Xcode installed on your Mac.
Follow these instructions to set up the project on your local machine.
Before you begin, ensure you have the following installed on your machine:
- macOS: Version 11.0 (Big Sur) or later
- Xcode: Version 12.0 or later
- Git: Version control system installed and configured
-
Open Terminal: You can find Terminal in your Applications folder or by using Spotlight (press
Cmd + Spaceand type "Terminal"). -
Navigate to the directory where you want to clone the repository. For example:
cd ~/Projects
-
Clone the repository using the Git command:
git clone https://github.com/saradrada/clever.git
-
Navigate to the cloned repository:
cd clever
-
Launch Xcode: You can open Xcode from the Applications folder or by using Spotlight.
-
Open the project: In Xcode, go to
File > Openand navigate to the directory where you cloned the repository. Select the.xcodeprojor.xcworkspacefile (depending on the project setup) to open the project.
If the project uses dependencies managed by Swift Package Manager (SPM), you'll need to install them.
-
Open the project in Xcode and ensure that the dependencies are listed under
File > Swift Packages. -
Xcode will automatically resolve and fetch the packages. If not, you can trigger it by going to
File > Swift Packages > Update to Latest Package Versions.
-
Select a target device or simulator: In the Xcode toolbar, choose a simulator or connected device from the device selector dropdown.
-
Build the project: Click on the build button (the play icon) in the top left corner of Xcode, or use the shortcut
Cmd + B. -
Run the project: After the build succeeds, the app will automatically launch on the selected device or simulator. If not, click the run button (play icon) to start the app.
If you encounter any issues, here are some common troubleshooting steps:
-
Clean the build: If you run into build errors, try cleaning the project by going to
Product > Clean Build Folderor using the shortcutCmd + Shift + K. -
Check for updates: Ensure Xcode and any dependencies are up to date.
-
Contact the developers:
- Sara Ortiz Drada (iOS Developer) saraodrada@gmail.com
- Yesid Lopez (Machine Learning Engineer) yesid.leonardo.lopez@hotmail.com
That's it! You should now have the Clever app running on your local machine.