Prerequisites
Before you begin, ensure you have the following installed on your system:macOS 14.0+
macOS Sonoma or later
Xcode 15+
Xcode 15 or later with Swift 5.9
Homebrew
Package manager for macOS
Command Line Tools
Xcode Command Line Tools
Install Homebrew
If you don’t have Homebrew installed, install it first:Install Xcode
Download and install Xcode from the Mac App Store or Apple Developer.Installation Steps
Run Setup Script
The setup script will install required development tools and configure your environment:This script will:
- Install XcodeGen for project file generation
- Install SwiftFormat and SwiftLint for code quality
- Install xcbeautify for better build output
- Install Lefthook for git hooks
- Set up git hooks automatically
- Generate the Xcode project file (
Ora.xcodeproj)
The script checks for existing installations and only installs missing dependencies.
Open in Xcode
Open the generated Xcode project:Wait for Xcode to resolve Swift Package Manager dependencies. This may take a few minutes on first launch.
Build Configurations
Ora Browser has two build configurations:Debug Build
- Uses development icon (
OraIconDev) - Includes hot reloading support via InjectionIII
- Enables developer-friendly compiler flags
- Uses debug entitlements (
ora-debug.entitlements)
Release Build
- Uses production icon (
OraIcon) - Optimized for performance
- Production entitlements (
ora.entitlements) - Ready for distribution
Project Dependencies
Ora Browser uses the following Swift packages:Development Tools
The following tools are automatically installed by the setup script:| Tool | Purpose | Command |
|---|---|---|
| XcodeGen | Generates Xcode project from project.yml | xcodegen |
| SwiftFormat | Automatic code formatting | swiftformat . --quiet |
| SwiftLint | Swift code linting | swiftlint --quiet |
| xcbeautify | Beautifies Xcode build output | Used in CI/CD |
| Lefthook | Git hooks manager | lefthook install |
Hot Reloading (Optional)
For faster development with live UI updates, set up InjectionIII:Install InjectionIII
Download from the Mac App Store
Configure InjectionIII
- Launch InjectionIII
- Click Open Project from the menu bar icon
- Select your
browserfolder
Run in Debug Mode
Build and run from Xcode. You should see a green status in the InjectionIII menu bar icon.
Hot reloading only works in Debug builds and has zero impact on Release builds.
Running Tests
From Xcode
Press ⌘U or go to Product → TestFrom Command Line
Regenerating the Xcode Project
If you need to modify project settings, editproject.yml and regenerate:
Troubleshooting
Build Failures
If you encounter build errors:- Clean build folder: Product → Clean Build Folder (⇧⌘K)
- Reset package cache: File → Packages → Reset Package Caches
- Regenerate project: Run
xcodegenagain - Restart Xcode: Sometimes a full restart is needed
Missing Dependencies
If setup script fails to install dependencies:Git Hooks Not Working
Reinstall git hooks:Signing Issues
For development, use Automatic code signing in Xcode:- Select the ora target
- Go to Signing & Capabilities
- Set “Automatically manage signing” to enabled
- Select your Apple Developer team
Next Steps
Quick Start
Learn how to use Ora Browser
Contributing
Contribute to Ora Browser
