Brave iOS Browser
Clone or download
Failed to load latest commit information.
.github 1.5 Release Nov 8, 2017
BraveShareTo Fix #438: allow to open in Brave more url types from other apps. (#1485) Apr 17, 2018
Certificates Merge branch 'development' into 1.6 (#1515) Apr 16, 2018
Client.xcodeproj Refactor SyncSettingsViewController. Oct 22, 2018
Client Merge pull request #1790 from iccub/send-sync-records-fix Oct 31, 2018
ClientTests Merge from firefox master Feb 18, 2016
L10nSnapshotTests Bug 1245219 - (2/2) L10N Intro Screen Snapshot - Snapshot generation Feb 2, 2016
MarketingUITests Merge from fx master Jan 25, 2016
NativeRefTests Bug 1248990 - Re-record LoginTableViewCell snapshots to reflect new c… Feb 17, 2016
Providers 1.5 Release Nov 8, 2017
ReadingList Swift 4 migration. (#1732) Sep 25, 2018
ReadingListTests Merge from fx master Jan 25, 2016
Shared Swift 4 migration. (#1732) Sep 25, 2018
SharedTests Swift 4 migration. (#1732) Sep 25, 2018
Storage Swift 4 migration. (#1732) Sep 25, 2018
StorageTests No Bug - Resolved import errors when running tests Feb 16, 2016
ThirdParty Swift 4 migration. (#1732) Sep 25, 2018
UITests Enable Private Browsing and hookup some test cases Mar 8, 2016
Utils Make app compile with the new core data stack Sep 28, 2018
analytics 1.5.1 Release (#1352) Nov 28, 2017
brave Update DAU weekly ping logic. (#1791) Nov 9, 2018
data Remove brave todos, and minor fixes between 1.7 core data stack version. Oct 3, 2018
fastlane Bug 1228290 - add ability to take automated snapshots with Fastlane Dec 1, 2015
.gitignore Setup script improvements Oct 4, 2018
.travis.yml Update .travis.yml Jun 3, 2015
AUTHORS Update AUTHORS Jan 29, 2015
AddToFavoritesActivity.swift Add 'add to favorites' share action. Jan 16, 2018
AlertPopupView.swift Swift 4 migration. (#1732) Sep 25, 2018
Cartfile Swift 4 migration. (#1732) Sep 25, 2018
Cartfile.resolved Update sync library to newest version. Oct 11, 2018
Client-Bridging-Header.h Update URIFixup and NSURL utilities from fx master Oct 17, 2016
DeviceDetector.swift Fix #1744, layout problems for 2018 iPhones (#1745) Oct 1, 2018
DeviceModelDetector.swift 1.5.4 release (#1462) Feb 23, 2018
Info.plist Bug 1247624 - Reset snapshot test schemes so that they run properly u… Feb 16, 2016
L10nSnapshotTests-Info.plist Bug 1247624 - Reset snapshot test schemes so that they run properly u… Feb 16, 2016
LICENSE Initial import Nov 4, 2014
LaunchScreen.storyboard apply new colors and icons Jan 22, 2018 Setup script improvements Oct 4, 2018
UIViewExtensions.swift Same, more swift3 Jun 28, 2017
ViewUtil.swift Fix #1409, done button bg color + sync screens layout improvements. (#… Jan 29, 2018 Add mixpanel back in Oct 20, 2016 Fixed checkout script invalid carthage command. (#1533) Apr 20, 2018

Brave iOS Browser

Download in the App Store

Brave is based on Firefox iOS, most of the Brave-specific code is in the brave dir

Deprecation Notice

This project is currently being deprecated and is being replaced by a new codebase. Please see brave-ios for our continued development work.

As of today, this is still the App Store version of Brave. High priority issues will continue to be fixed until Brave 2.0 replaces this repo on the App Store.


When looking at browser-ios issues some issues have been labeled with:
v2 Relevant: Issues that might be relevant for the new codebase. Some of these will be fixed here, and others may not be.
v2 Only: Issues that will not be fixed on this codebase, but will be addressed in the new repo.

Why the Change?

The primary reason for this project's deprecation is to support Apple's WKWebView. Brave iOS is still utilizing UIWebView, which contains many website comptability issues. Although it is possible to handle this upgrade on browser-ios, rebuilding from a new fork provides many useful advantages. The complexity of upgrading to WKWebView touches most of the current project, and this seemed like an obvious time to switch project bases.

Adding Brave to your app to open links

Either ensure your app supports opening urls in a share menu or use this project to open links directly.


1. Install Xcode from the AppStore

2. Install the latest LTS version of Node.js

3. Install Homebrew:

/usr/bin/ruby -e "$(curl -fsSL"

4. Install Carthage:

brew install carthage

5. Download the source code:

git clone # this will download git if it isn't currently installed

6. Run the following commands:

cd browser-ios
./ # this pulls Carthage dependencies
(cd brave && ./ your.fake.appid) # put in a fake unique app id if you want to build to device
open Client.xcodeproj

Note: building your own ad-hoc builds is supported see user device build

You will need a Apple developer account to run on your device.


Run Product>Test in Xcode to do so. Not all Firefox tests are passing yet.

Contribution Notes

Most of the code is in the brave/ directory. The primary design goal has been to preserve easy merging from Firefox iOS upstream, so hopefully code changes outside of that dir are minimal.

To find changes outside of brave/, look for #if BRAVE / #if !BRAVE (#if/#else/#endif is supported by Swift).

Adding Carthage modules

  1. Add line into Cartfile, run carthage bootstrap to update Cartfile.resolved
  2. Verify that your new module has been added to Cartfile.resolved
  3. Run
  4. In the Xcode Project, go to Client target settings, open the Build Phases tab and add a line such as

Provisioning Profiles using a Team account

(This section doesn't apply to individual developer accounts, Xcode managed profiles seem to work fine in that case.)

Do not use 'Xcode managed profiles', there is no advantage to this, and debugging problems with that system is a dead end due to lack of transparency in that system.

brave/build-system/profiles has some handy scripts to download the adhoc or developer profiles and install them.

JS Tips

For anyone working with JS in iOS native, I recommend running and debugging your JS in an attached JS console. (Not using an edit/compile/debug cycle in Xcode). When you run from Xcode any iOS web view in the simulator (or attached device), you can then attach from Safari desktop (the Develop menu), and you get a JS console to work in.

We have various JS interpreters available: UIWebView, JavaScriptCore, and WKWebView.

The first is required if we are running JS on the web page, since we are using UIWebView. JavaScriptCore is a stand-alone JS engine that I believe is more up-to-date than UIWebView's. WKWebView will have the most modern JS engine, but requires instantiating a WKWebView for this purpose, which we would prefer to avoid as that is a heavy approach. UIWebView's JS engine is a few years old, and is quite primitive.

None of these are comparable to Safari iOS's JS engine, which is highly up-to-date in its capabilities but is not available to us.

Release Builds

brave/build-system/ does everything. When that completes, the Fabric app detects a new archive and asks to distribute to testers.

Misc Tips

If you get the dreaded "Launch Services Error 0": open ~/Library/Logs/CoreSimulator/CoreSimulator.log for info

Go to the Brave app folder for the most recently run simulator:

cd ~/Library/Developer/CoreSimulator/Devices && cd `ls -t | head -1` && cd data/Containers/Data/Application && cd `find . -iname "*brave*" | head -1 | xargs -I{} dirname {}`