# What Platforms Does the BitChat Universal App Support?

> Discover which platforms BitChat supports. This universal Swift app runs natively on iOS, iPadOS, and macOS, sharing a single codebase for efficient development.

- Repository: [permissionlesstech/bitchat](https://github.com/permissionlesstech/bitchat)
- Tags: getting-started
- Published: 2026-07-29

---

**BitChat runs natively on both iOS (including iPadOS) and macOS as a universal Swift application, compiling platform-specific binaries from a single shared codebase using conditional compilation directives.**

BitChat is an open-source peer-to-peer messaging client developed by permissionlesstech. The repository implements a universal app architecture that delivers optimized native experiences across Apple's mobile and desktop ecosystems without duplicating core logic or maintaining separate branches for each operating system.

## Native Platform Support

According to the [`README.md`](https://github.com/permissionlesstech/bitchat/blob/main/README.md) file at the repository root, BitChat is explicitly architected as a **universal app** with "Native support for iOS and macOS". This designation means the project produces distinct, optimized binaries for each platform while sharing Swift source files between targets.

The universal model provides several technical advantages:

- **Single codebase maintenance**: Business logic and data models exist once, reducing synchronization overhead
- **True native compilation**: iOS targets use UIKit while macOS targets use AppKit, avoiding abstraction penalties from translation layers
- **Platform-appropriate behaviors**: System integrations like notifications, file handling, and settings navigation use native APIs on each OS

## Xcode Project Configuration

The `bitchat.xcodeproj` directory contains explicit build schemes that confirm dual-platform support. These configuration files instruct the Swift compiler how to process the shared source tree for each target.

Key files defining platform support:

- `bitchat.xcodeproj/xcshareddata/xcschemes/bitchat (iOS).xcscheme` – Configures builds for iPhone and iPad devices
- `bitchat.xcodeproj/xcshareddata/xcschemes/bitchat (macOS).xcscheme` – Configures builds for macOS desktops
- `bitchat.xcodeproj/project.pbxproj` – Defines build targets, linking frameworks, and deployment settings for both platforms

These schemes compile identical source files but apply platform-specific preprocessor definitions and framework linking contexts.

## Conditional Compilation Implementation

BitChat leverages Swift's build-time conditional compilation to branch between UIKit (iOS) and AppKit (macOS) APIs. The codebase uses `#if os(iOS)` and `#if os(macOS)` directives extensively to handle platform divergences without runtime overhead.

### View Controller Abstraction

Rather than maintaining separate view controller hierarchies, the codebase defines platform-agnostic type aliases that map to the appropriate framework classes:

```swift
#if os(iOS)
import UIKit
typealias PlatformViewController = UIViewController
#elseif os(macOS)
import AppKit
typealias PlatformViewController = NSViewController
#endif

class ChatViewController: PlatformViewController {
    // Shared chat logic executes natively on both platforms
}

```

This pattern appears throughout the `bitchat/` source directory, enabling shared inheritance chains while respecting platform-specific UI frameworks.

### System API Divergence Handling

Platform-specific functionality isolates system calls through conditional blocks. For example, opening system settings uses different APIs on each OS:

```swift
#if os(iOS)
func openSettings() {
    UIApplication.shared.open(URL(string: UIApplication.openSettingsURLString)!)
}
#elseif os(macOS)
func openSettings() {
    NSWorkspace.shared.openFile("/System/Library/PreferencePanes/Network.prefPane")
}
#endif

```

The `UIApplication` class handles iOS URL-based navigation, while macOS uses `NSWorkspace` to open preference pane files directly. These implementations typically reside in utility files such as [`bitchat/Utils/PlatformHelpers.swift`](https://github.com/permissionlesstech/bitchat/blob/main/bitchat/Utils/PlatformHelpers.swift).

## Universal App Versus Catalyst

BitChat implements true universal app architecture rather than Mac Catalyst. This distinction matters for performance and user experience:

- **Universal approach**: Compiles native AppKit code for macOS and UIKit for iOS, allowing full access to macOS-specific window management and menu bar integrations
- **Catalyst approach**: Would run iPad-optimized UIKit code on macOS through translation, limiting native desktop behaviors

The project achieves this through the `#if os()` compile-time switches rather than runtime checks, ensuring each binary contains only the code relevant to its target platform.

## Summary

BitChat delivers cross-platform support through:

- **iOS and macOS** native binaries generated from a single Swift codebase
- **Xcode scheme files** `bitchat (iOS).xcscheme` and `bitchat (macOS).xcscheme` defining separate build configurations
- **`#if os()` conditional compilation** directives that select between UIKit and AppKit APIs at build time
- **Type alias abstractions** like `PlatformViewController` enabling shared class hierarchies across platforms
- **Platform-specific system calls** isolated in utility modules to handle OS-specific behaviors like settings navigation

## Frequently Asked Questions

### Does BitChat support Windows or Android?

No. BitChat is built exclusively for Apple's ecosystem using Swift and native Apple frameworks. The universal app designation applies only to iOS and macOS support, not cross-platform compatibility with Windows, Android, or Linux operating systems.

### How does BitChat handle differences between iPhone and iPad?

The codebase treats iPadOS as part of the iOS platform target. The `#if os(iOS)` directive covers both iPhone and iPad devices, with size-class and trait-collection APIs handling layout differences rather than separate compilation units. The macOS target remains the distinct platform requiring separate scheme files.

### What file contains the platform build settings?

Platform-specific build configurations reside in `bitchat.xcodeproj/project.pbxproj`, which defines compiler flags, linked frameworks, and deployment targets separately for the iOS and macOS build targets. The scheme files in `xcshareddata/xcschemes/` reference these targets to initiate platform-specific builds.

### Why doesn't BitChat use Mac Catalyst for macOS support?

BitChat avoids Mac Catalyst to deliver a fully native macOS experience using AppKit rather than translated iPad interfaces. This permits proper macOS-specific behaviors such as native menu bars, window management, and preference panes that Catalyst apps cannot easily implement.