Build iOS from Source

Set Up Xcode & Build Your iOS App

Overview

This step-by-step guide will help you install Xcode, extract and open your iOS source code, build and run your app, and configure key capabilities like push notifications.

Install Xcode

Before proceeding, you must first set up your local iOS development environment. This involves installing Xcode on a computer running macOS.

Download Xcode

🚧

Xcode Version

Use the latest stable (non-beta) version of Xcode for compatibility.

Once installed, proceed with the steps below to download and build your Median app.

Download iOS Source Code

Access your app’s private management page to download the iOS source code:

  1. Navigate to the "Build & Download" tab.
  2. Click "Download Source" under the iOS section (see Figure 1).
Figure 1

Figure 1 - Download iOS Source

Extract and Open the Source Code

After downloading, extract the ios_source.tar.gz file using one of the following methods:

Method 1: Using Finder

  1. Double-click ios_source.tar.gz to extract it.
  2. Open the extracted folder and double-click <yourapp>.xcworkspace.

Method 2: Using Terminal

  1. Open Terminal and execute:
    tar -xzvf ios_source.tar.gz
    Please note that the tar command will extract the file to a subdirectory named β€œios”. If there is an existing directory with the same name it will be overwritten.
  2. Navigate to the extracted folder and open the workspace:
    open <yourapp>.xcworkspace

❗️

Important: .xcworkspace not .xcodeproj

Always open <yourapp>.xcworkspace, not <yourapp>.xcodeproj, as Median App Studio uses Cocoapods for dependency management.

Figure 2

Figure 2 - Open the .xcworkspace file

Build and Run the App in the Simulator

  1. In Xcode, select a simulator or connected device from the dropdown menu.
  2. Click the "Run" play button.
  3. Xcode will compile and launch the app in the chosen simulator or device.

Figure 3

Figure 3 - Run App in the Simulator

Cocoapods Dependency Management

Median automatically installs all required dependencies when you download the source code. You do not need to run pod install manually. If you need to install additional pods not supplied by Median please contact our support team for assistance.

πŸ“˜

Missing Files

If you encounter missing file errors, clean your build folder and derived data: https://stackoverflow.com/questions/38016143/how-can-i-delete-derived-data-in-xcode-8

Adding Capabilities (e.g., Push Notifications)

Certain features, such as push notifications, require manually enabling capabilities in Xcode:

How to Enable Push Notifications in Xcode

  1. Open Xcode and select your app in the left panel.
  2. Navigate to "Signing & Capabilities" in the right panel.
  3. Click the "+ Capability" button.
Figure 4

Figure 4 - Adding Capabilities

  1. Search for and select "Push Notifications."
Figure 5

Figure 5 - Search for Push Notifications Capability

  1. The capability will appear under "Signing & Capabilities."
Figure 6

Figure 6 - Confirm that a Capability has been added

Frequently Asked Questions

How do I fix the "ITMS-90078: Missing Push Notification Entitlement" error when submitting my app to App Store Connect?

This warning indicates that your code includes methods for registering a push token, suggesting that the app intends to use push notifications. However, since the required entitlement is missing, push notification functionality will not work.

If you do not want to use push notifications in your app, you can ignore this message.