Firefox for iOS (Xcode Simulator)

Contributors Contributors Last updated: 6 days ago

This will help you to have a useable copy of Firefox for iOS running on a macOS computer. It will provide a version close to the main Release version of Firefox for iOS. Please note that this method does involve some large downloads and may take some to set up initially. Running an app in the Xcode Simulator can be quite taxing on a computer, so it is worthwhile closing any other apps you have open.

Install the version of Xcode required to build Firefox for iOS from https://xcodereleases.com/ (free Apple Developer account needed). The version number can be found at https://github.com/mozilla-mobile/firefox-ios#readme and it may require a certain minimum version of macOS to install. This will be a very large download and may take some time.

You will also need a recent Node.js version available on your system. You can either follow https://github.com/mozilla-mobile/firefox-ios/wiki/Automated-Project-Setup-with-FXIOS which will require installing https://brew.sh/ and will take care of the rest, or you can set that up manually following https://github.com/mozilla-mobile/firefox-ios/tree/main/firefox-ios#readme

Open the Terminal (macOS has a built–in Terminal.app utility that you can search for from Spotlight). Type each command and press Enter, the command will then run and return to the terminal cursor for you to run the next line.

To verify whether node is available, run:

  • node -v

If the result is a version 16.x or 20.x and above, the environment is ready. If you get an error that node is not found, you might need to install it using some of the guides linked above, or for simplicity just:

(if you have brew already available, either brew install n or brew install node are better options.)

This will clone the mozilla-mobile/firefox-ios repository to your current user directory, and will take a while:

In the following line, replace the XXX.X with the lastest version number (example: git checkout release/v150.0)

  • git checkout release/vXXX.X
  • sh ./bootstrap.sh

Open Xcode and navigate to ~/firefox-ios and select the Client.xcodeproj file. After opening for the first time and also after major changes, several dependencies will need to download, which may take a while. First time running the project you will also get prompted to approve using a macro.

Along the top of Xcode, change Account to Fennec and select a current iOS device. Select the Play icon to start the build process. Firefox for iOS will be built and will display in the Xcode simulator.

Next time you need to pull updates from the repository, open the Terminal, and run:

  • cd firefox-ios
  • git fetch
  • git checkout release/vXXX.X
  • sh ./bootstrap.sh

replacing the XXX.X with the version you want to check out this time. After the scripts finish running, you can continue with the Xcode steps described earlier. (It is better to close Xcode while running these commands to eliminate any potential conflicts.)

These fine people helped write this article:

Illustration of hands

Volunteer

Grow and share your expertise with others. Answer questions and improve our knowledge base.

Learn More