Skip to content

Building from Source

Ade Ramdani edited this page May 26, 2026 · 1 revision

Building from Source


Prerequisites

Tool Version
macOS 15 Sequoia or later
Xcode 16.0+
Swift 6.0

An Apple Developer account is required for code signing (free tier works for local development).


Clone and Open

git clone https://github.com/aderamdani/NetUtil.git
cd NetUtil
open NetUtil.xcodeproj

Configure Signing

  1. Open NetUtil.xcodeproj in Xcode
  2. Select the NetUtil target
  3. Go to Signing & Capabilities
  4. Set Team to your Apple Developer account
  5. Bundle identifier can stay as com.aderamdani.NetUtil or change it

Required for Network.framework and CoreWLAN entitlements.


Build and Run

Press ⌘R or select Product → Run.

The app launches as a standard macOS window app. First launch may trigger a network permission prompt.


Command Line Build

xcodebuild \
  -scheme NetUtil \
  -configuration Release \
  -destination 'platform=macOS' \
  build

Output in ~/Library/Developer/Xcode/DerivedData/.


Creating a DMG Release

Requires create-dmg:

brew install create-dmg

Build the app archive first:

xcodebuild \
  -scheme NetUtil \
  -configuration Release \
  -archivePath build/NetUtil.xcarchive \
  archive

Export the app:

xcodebuild \
  -exportArchive \
  -archivePath build/NetUtil.xcarchive \
  -exportPath build/export \
  -exportOptionsPlist ExportOptions.plist

Create DMG:

mkdir -p dist
create-dmg build/export/NetUtil.app dist/ 2>/dev/null || true
mv dist/*.dmg dist/NetUtil-$(git describe --tags --abbrev=0).dmg

Regenerating App Icon

swift generate_icon.swift

Outputs all required icon sizes (16–1024 px) to NetUtil/Assets.xcassets/AppIcon.appiconset/.


Entitlements

NetUtil.entitlements:

<key>com.apple.security.app-sandbox</key><true/>
<key>com.apple.security.network.client</key><true/>

com.apple.security.network.client is required for all outbound connections. App Sandbox is required for Mac App Store distribution.

Clone this wiki locally