A lightweight, native macOS web browser built with WebKit and Cocoa. It includes a macOS-style menu bar, toolbar with navigation controls, tabs, and basic bookmarks. The project ships with scripts to build a .app, package a .dmg, and publish a GitHub Release with downloadable artifacts.
- Native UI: standard menu bar and customizable toolbar
- Tabs: multiple
WKWebViewinstances viaNSTabView - Navigation: Back/Forward, Reload/Stop, Home, URL field with search fallback
- Bookmarks: add current page and open from the Bookmarks menu
- Packaging: produces
.appand.dmgartifacts - Publishing: one‑command GitHub release with assets
- macOS with Xcode Command Line Tools:
xcode-select --install - Optional (recommended for Swift build): Full Xcode and select it:
sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
- Build artifacts
cd NativeMacBrowser && chmod +x build.sh && ./build.sh
- Run locally
open NativeMacBrowser/dist/NativeMacBrowser.app
- Create a DMG (done by the build script)
NativeMacBrowser/dist/NativeMacBrowser.dmg
- New Tab:
Cmd+T - Close Tab:
Cmd+W - Reload:
Cmd+R - Back/Forward:
Cmd+[/Cmd+]
The publish script builds artifacts (if needed), pushes code, tags, creates/uses a GitHub Release, and uploads the .dmg and a zipped .app.
- Export token (needs repo write permission)
export GITHUB_TOKEN=YOUR_TOKEN
- Optional overrides
export GITHUB_REPO=allthingssecurity/browserexport RELEASE_TAG=v1.0-b1-$(date +%Y%m%d-%H%M%S)export RELEASE_NAME="NativeMacBrowser 1.0 (build 1)"
- Run publish
cd NativeMacBrowser && chmod +x publish.sh && ./publish.sh
- App bundle:
NativeMacBrowser/dist/NativeMacBrowser.app - Disk image:
NativeMacBrowser/dist/NativeMacBrowser.dmg - Release assets (after publish): on your GitHub repo’s Releases page
- Primary implementation (Objective‑C fallback):
NativeMacBrowser/ObjCSources/AppDelegate.m:1,NativeMacBrowser/ObjCSources/main.m:1 - Swift version (not compiled if local Swift toolchain has module conflicts):
NativeMacBrowser/Sources/AppDelegate.swift:1,NativeMacBrowser/Sources/main.swift:1 - App metadata:
NativeMacBrowser/Info.plist:1 - Build script:
NativeMacBrowser/build.sh:1 - Publish script:
NativeMacBrowser/publish.sh:1
- The build prefers Swift (
swiftcwithCocoa+WebKit). If the local toolchain has module issues, it falls back to Objective‑C (clang -fobjc-arc -fmodules). Either path produces the same.appand.dmglayout. - The build uses ad‑hoc codesigning for local runs. For distribution, use your Developer ID identity.
- Replace ad‑hoc codesign step in
build.shwith your Developer ID certificate, e.g.:codesign --force --deep --options runtime --sign "Developer ID Application: Your Name (TEAMID)" dist/NativeMacBrowser.app
- Notarize and staple (example):
xcrun notarytool submit dist/NativeMacBrowser.dmg --apple-id <id> --team-id <team> --password <app-specific-pass> --waitxcrun stapler staple dist/NativeMacBrowser.dmg
- Swift toolchain errors (e.g.,
SwiftBridging redefinition/could not build module 'Foundation'):- Install full Xcode and select it:
sudo xcode-select -s /Applications/Xcode.app/Contents/Developer - Re‑run:
./build.sh
- Install full Xcode and select it:
- Gatekeeper blocks the app: right‑click the
.app→ Open, or clear quarantine:xattr -dr com.apple.quarantine NativeMacBrowser/dist/NativeMacBrowser.app
- Release already exists (tag collision): set a fresh
RELEASE_TAGand re‑runpublish.sh.
- Persistent bookmarks/history (~/Library/Application Support)
- Downloads manager UI
- Address bar improvements:
Cmd+L, autocomplete, search suggestions - Private windows, per‑site permissions, content blocking via
WKContentRuleList - Xcode project + CI workflow for build/sign/notarize on tag
- Source (ObjC):
NativeMacBrowser/ObjCSources/ - Source (Swift):
NativeMacBrowser/Sources/ - Packaging:
NativeMacBrowser/build.sh:1 - Publishing:
NativeMacBrowser/publish.sh:1 - Artifacts:
NativeMacBrowser/dist/
- Open issues and PRs are welcome. Proposed areas: UI polish, downloads/history/bookmarks persistence, security/privacy features, build/release automation.