Revision control

2
===============
3
5
6
This branch (master)
7
-----------
8
9
This branch only works with [Xcode 11.4](https://apps.apple.com/app/xcode/id497799835), Swift 5.2 and supports iOS 12.0 and above.
10
11
Please make sure you aim your pull requests in the right direction.
12
13
For bug fixes and features for a specific release use the version branch.
14
15
Getting involved
16
----------------
17
18
Want to contribute but don't know where to start? Here is a list of [issues that are contributor friendly](https://github.com/mozilla-mobile/firefox-ios/issues?q=is%3Aissue+is%3Aopen+label%3A%22Contributor+OK+%F0%9F%A4%9D%22)
19
20
Building the code
21
-----------------
22
23
1. Install the latest [Xcode developer tools](https://developer.apple.com/xcode/downloads/) from Apple.
24
1. Install Carthage
25
```shell
26
brew update
27
brew install carthage
28
```
29
1. Clone the repository:
30
```shell
32
```
33
1. Pull in the project dependencies:
34
```shell
35
cd firefox-ios
36
sh ./bootstrap.sh
37
```
38
1. Open `Client.xcodeproj` in Xcode.
39
1. Build the `Fennec` scheme in Xcode.
40
41
## Building User Scripts
42
43
User Scripts (JavaScript injected into the `WKWebView`) are compiled, concatenated and minified using [webpack](https://webpack.js.org/). User Scripts to be aggregated are placed in the following directories:
44
45
```
46
/Client
47
|-- /Frontend
48
|-- /UserContent
49
|-- /UserScripts
50
|-- /AllFrames
51
| |-- /AtDocumentEnd
52
| |-- /AtDocumentStart
53
|-- /MainFrame
54
|-- /AtDocumentEnd
55
|-- /AtDocumentStart
56
```
57
58
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:
59
60
* `AllFramesAtDocumentEnd.js`
61
* `AllFramesAtDocumentStart.js`
62
* `MainFrameAtDocumentEnd.js`
63
* `MainFrameAtDocumentStart.js`
64
65
To simplify the build process, these compiled files are checked-in to this repository. When adding or editing User Scripts, these files can be re-compiled with `webpack` manually. This requires Node.js to be installed and all required `npm` packages can be installed by running `npm install` in the root directory of the project. User Scripts can be compiled by running the following `npm` command in the root directory of the project:
66
67
```
68
npm run build
69
```
70
71
## Contributing
72
73
Want to contribute to this repository? Check out [Contributing Guidelines](https://github.com/mozilla-mobile/firefox-ios/blob/master/CONTRIBUTING.md)