Prerequisites
Before building Ora Browser, ensure you have the following installed:- macOS 14.0 or later
- Xcode 15 or later (Swift 5.9)
- Homebrew (for developer tooling)
The current minimum deployment target is macOS 15.0. The project uses Swift 5.9 and requires Xcode 15 or later.
Initial Setup
Run the setup script
The setup script will install all required tools and configure your development environment:This script automatically:
- Installs required Homebrew packages (xcodegen, swiftlint, swiftformat, xcbeautify, lefthook)
- Installs git hooks for code formatting and linting
- Generates the Xcode project from
project.yml
Development Builds
Building in Xcode
To build and run Ora Browser for development:- Select the ora scheme in Xcode
- Choose your target device (Mac)
- Press ⌘R to build and run
- Developer icon variant (OraIconDev)
- Hot reloading support via InjectionIII
- Interposable linking for runtime code replacement
- No code signing requirements
Building from Command Line
For a quick debug build without Xcode:- No code signing (
CODE_SIGN_IDENTITY="") - Pretty-printed output via xcbeautify
- Faster iteration for testing
Hot Reloading
Ora supports live UI updates during development using InjectionIII.Install InjectionIII
Download InjectionIII from the Mac App Store
Connect to your project
- Launch InjectionIII
- Click the menu bar icon
- Select Open Project
- Navigate to your
browserfolder
Using Hot Reload
Once connected, edit any Swift file and save—changes will appear instantly without rebuilding. To add hot reload support to a new view:How It Works
The Debug build configuration enables hot reloading through:project.yml
EMIT_FRONTEND_COMMAND_LINESexposes compiler flags for InjectionIII-Xlinker -interposablemakes functions replaceable at runtime- Root views use
@ObserveInjectionto re-evaluate after injection
Project Configuration
Ora uses XcodeGen to generate the Xcode project from a YAML specification.Regenerating the Project
After modifyingproject.yml, regenerate the Xcode project:
Always edit
project.yml instead of Xcode project settings. The .xcodeproj is regenerated and should not be manually modified.Project Structure
Theproject.yml defines:
Build Scripts
The project includes automated build scripts in thescripts/ directory:
setup.sh
Installs dependencies, configures git hooks, and generates the Xcode project
xcbuild-debug.sh
Quick debug build from command line without code signing
build-release.sh
Full release build with signing, notarization, and DMG creation
create-release.sh
End-to-end release process with versioning and deployment
Code Quality
Automatic Formatting
Code formatting and linting are enforced via git hooks:lefthook.yml
Manual Formatting
Run formatting tools manually:Git hooks are installed automatically by
./scripts/setup.sh using lefthook. They run before every commit and push.Troubleshooting
Xcode Build Errors
If you encounter build errors:- Clean the build folder: Product → Clean Build Folder (⇧⌘K)
- Regenerate the project: Run
xcodegenin the project root - Reset Package Cache: File → Packages → Reset Package Caches
Missing Dependencies
If Homebrew packages are missing, run:Hot Reload Not Working
- Verify InjectionIII shows green status
- Ensure Debug configuration is selected
- Check that the project path is correct in InjectionIII
- Rebuild the project (⌘B)
Next Steps
Testing
Learn how to run tests and write new test cases
Releases
Understand the release process and distribution
