This is the subdirectory that contains the Firefox for iOS application.
Firefox for iOS works with Xcode 16.1, Swift 5.6 and supports iOS 15.0 and above.
Please make sure you aim your pull requests in the right direction.
For bug fixes and features for a specific release, use the version branch.
See readme at the root of the project for the guidelines on how to contribute to this project.
- Install the latest Xcode developer tools from Apple.
- Install, Brew, Node, and a Python3 virtualenv for localization scripts:
brew update brew install node pip3 install virtualenv
- Clone the repository:
git clone https://github.com/mozilla-mobile/firefox-ios
- Change directories to the project root:
cd firefox-ios
- From the project root, install Node.js dependencies, build user scripts and update content blocker:
sh ./bootstrap.sh
- Open the
Client.xcodeproj
under thefirefox-ios
folder in Xcode. - Make sure to select the
Fennec
scheme in Xcode. - Select the destination device you want to build on.
- Run the app with
Cmd + R
or by pressing thebuild and run
button.
- Xcode -> File -> Packages -> Reset Package Caches
User Scripts (JavaScript injected into the WKWebView
) are compiled, concatenated, and minified using webpack. User Scripts to be aggregated are placed in the following directories:
/Client
|-- /Frontend
|-- /UserContent
|-- /UserScripts
|-- /AllFrames
| |-- /AtDocumentEnd
| |-- /AtDocumentStart
|-- /MainFrame
|-- /AtDocumentEnd
|-- /AtDocumentStart
This reduces the total possible number of User Scripts down to four. The compiled output from concatenating and minifying the User Scripts placed in these folders resides in /Client/Assets
and are named accordingly:
AllFramesAtDocumentEnd.js
AllFramesAtDocumentStart.js
MainFrameAtDocumentEnd.js
MainFrameAtDocumentStart.js
To simplify the build process, these compiled files are checked-in to this repository.
To start a watcher that will compile the User Scripts on save, run the following npm
command in the root directory of the project:
npm run dev
npm run dev
will build the JS bundles in development mode with source maps, which allows tracking down lines in the source code for debugging.
To create a production build of the User Scripts run the following npm
command in the root directory of the project:
npm run build