Skip to content
This repository has been archived by the owner on Mar 6, 2024. It is now read-only.

Development Environment Setup

Stefan Arentz edited this page Jan 31, 2022 · 2 revisions

This document describes how to setup a development environment for Focus iOS that allows you to Build & Run this app on both the sumulator and a real device. It assumes you are a Mozillian with an account on the Mozilla Apple Developer portal.

Requirements

  • An Intel or M1 Mac with the latest macOS 12.
  • A @mozilla.com Apple ID that has been added to Mozilla's Developer Account with the Developer role and access to Focus iOS.
  • An iOS device that has been registered in the Mozilla Developer Account.

If you do not have a Developer account, work with your contact to set that up. You cannot use a Free Personal Developer Account to work on Focus iOS. The product uses app extensions, which only work in paid account. Working in the Simulator with your own account is fine though.

TODO We have a PR that needs to land to make it simple to switch development teams. This will allow anyone to work on Focus on their own device. See Move build settings to xcconfig

Steps

1. Install Xcode 13

The latest version of Xcode 13 can be downloaded from developer.apple.com/download/more or the App Store.

After installing Xcode 13, go to Settings/Account and add your @mozilla.com Apple ID. In the list of Teams & Roles you should see that you are now part of Mozilla Corporation with the Developer role. If you do not see this, reach out to your engineering manager to get that setup.

There is no need to install the command line tools as these are embedded in Xcode and can be activated with:

sudo xcode-select -s /Applications/Xcode.app

2. Clone the project

git clone git@github.com:mozilla-mobile/focus-ios.git

3. Bootstrap the project

cd focus-ios
sh ./checkout.sh

This will pull in and convert the tracker blocklists that Focus uses.

5. Run the app in the simulator

Before running on a device, run the app in the simulator. If this works you are 75% there and know that your development environment is setup correctly.

6. Build & Run on Device

At this point you should be able to select your iOS device and run the app on it.