1. Home
  2. Docs
  3. Documentation
  4. Getting Started with Swift
  5. Running Swift Apps in Xcode

Running Swift Apps in Xcode

To run our Swift apps, you first need to install all dependencies. Our dependency manager is CocoaPods, so you’ll install all Pods first.

1. Install the Pods 

Once you’ve unarchived the downloaded .zip file purchased from our website, locate the folder in your terminal and run “pod update“.

cd ~/Downloads/INSERT_FOLDER_OF_APP_TEMPLATE_HERE
pod update

Please make sure you replace the path (“INSERT_FOLDER_OF_APP_TEMPLATE_HERE”) with the correct path and name of the downloaded folder. “INSERT_FOLDER_OF_APP_TEMPLATE_HERE” is used only as an example for the purpose of the documentation. If this is the first time you ever use the Terminal and want to understand more about it, follow this quick command line tutorial. Once you’ve successfully installed the CocoaPods dependencies, you should get this successful output: xcode projects Do not proceed to the next step unless you get this output (all projects are installed and in green color). This step takes only 30 seconds for 99% of the people, but some developers might encounter errors, in which case you should refer to the official CocoaPods documentation and community.

2. Open .xcworkspace file in Xcode

The command above will generate a .xcworkspace file (NameOfAppTemplate.xcworkspace), which should then be opened in Xcode. Please make sure you are opening the .xcworkspace file, and NOT the .xcodeproj file, since this is a common mistake and the code won’t run.

3. Run the Xcode project

To run the Xcode project, you can click the “Play” (Run) button on the top left corner, or you can simply press Command + R. Make sure you select which specific device or simulator you want the app to run on since the Generic iOS Device won’t work. Once Xcode project builds, your app should be up and running in the simulator like in the image below: run xcode project Great job! Now that you’re able to run the app in Xcode successfully, head over to the next step that helps you link the app to your own Firebase backend. Getting build errors here? You either:

  1. Did not install CocoaPod dependencies correctly OR
  2. You opened the wrong file in Xcode

Revise the steps in this section again, and re-build the app. Make sure you actually press the “Run” button in Xcode before acknowledging that there are compiling errors. Do not worry about warnings! Warnings are just warnings, they don’t prevent the app from running optimally in any way. All warnings are coming from 3rd party dependencies that the mobile app is using (e.g. Firebase, Stripe, etc), so they are not under our control anyway (you can talk to Google or Stripe to change their code for warnings to disappear).