/forked-neeva-ios

Neeva iOS Browser

Primary LanguageSwiftBSD 3-Clause "New" or "Revised" LicenseBSD-3-Clause

Neeva for iOS

Download on the App Store.

This branch (main)

This branch works with Xcode 13.0, Swift 5.5 and supports iOS 14.0 and above.

Getting involved

Check out our Contributor Guidelines

Want to contribute but don't know where to start? Here is a list of good first issues.

Building the code

  1. Install the latest Xcode developer tools from Apple.
  2. Install Carthage, Node, and a Python 3 virtualenv for localization scripts:
    brew update
    brew install carthage
    brew install node
    pip3 install virtualenv
  3. Clone the repository:
    git clone https://github.com/neevaco/neeva-ios.git
  4. Pull in the project dependencies:
    cd neeva-ios
    sh ./bootstrap.sh
  5. Open Client.xcodeproj in Xcode.
  6. Build the Client scheme in Xcode.

Building User Scripts

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. 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:

npm run build

Periphery

Periphery scans the project (currently just the Client code) for unused variables, constants, functions, structs, and classes. To use Periphery, first install it using Homebrew:

brew tap peripheryapp/periphery && brew install periphery

Then switch to the Periphery target in Xcode and build (⌘B). You‘ll get a large number of warnings as a result. Note that many of the warnings are either false positives (i.e. the constant is actually used somewhere in the project) or are due to parameters passed in iOS’s standard delegate pattern.

History of the codebase

The Neeva browser stands on the shoulders of the excellent Firefox for iOS browser. We forked on Feb 18 at c23bd56293da4e2913e1d512ee559e784dd21e48, and the project has diverged substantially enough that it hasn't made sense to merge updates since.

Thank you to Mozilla for providing such a fantastic foundation for this project and many others.