Name: browser-ios
Owner: Brave Software
Description: Brave iOS Browser
Created: 2015-10-22 18:19:43.0
Updated: 2018-05-23 21:53:31.0
Pushed: 2018-05-24 03:26:31.0
Homepage: https://www.brave.com
Size: 504926
Language: C
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
Download in the App Store
Brave is based on Firefox iOS, most of the Brave-specific code is in the brave dir
Either ensure your app supports opening urls in a share menu or use this project https://github.com/brave/ios-open-thirdparty-browser to open links directly.
1. Install Xcode from the AppStore
2. Install the latest LTS version of Node.js
3. Install Homebrew:
/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
4. Install Carthage:
install carthage
5. Download the source code:
clone https://github.com/brave/browser-ios.git # this will download git if it isn't currently installed
6. Run the following commands:
rowser-ios
eckout.sh # this pulls Carthage dependencies
brave && ./setup.sh your.fake.appid) # put in a fake unique app id if you want to build to device
Client.xcodeproj
You will need a Apple developer account to run on your device.
To enable, add ~/.brave-fabric-keys with 2 lines, the API key and build secret. Re-run setup.sh and the project will be generated to use Fabric and Crashlytics frameworks.
Run Product>Test in Xcode to do so. Not all Firefox tests are passing yet.
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).
carthage bootstrap
to update Cartfile.resolvedcheckout.sh
Build Phases
tab and add a line such asCROOT)/Carthage/Build/iOS/FRAMEWORKNAME.framework
(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.
S Tips
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.
ave various JS interpreters available: UIWebView, JavaScriptCore, and WKWebView.
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.
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.
elease Builds
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:
/Library/Developer/CoreSimulator/Devices && cd `ls -t | head -1` && cd data/Containers/Data/Application && cd `find . -iname "*brave*" | head -1 | xargs -I{} dirname {}`