# What Platforms Does BitChat Support? iOS and macOS Compatibility Guide

> Discover BitChat platform compatibility. Learn which iOS and macOS versions the permissionlesstech/bitchat app supports, ensuring a smooth experience on your devices.

- Repository: [permissionlesstech/bitchat](https://github.com/permissionlesstech/bitchat)
- Tags: compatibility-guide
- Published: 2026-08-19

---

**BitChat supports iOS 16+ and macOS 13+ (Ventura and later), with platform constraints hardcoded in the root Package.swift and enforced at compile time by the Swift Package Manager.**

BitChat (permissionlesstech/bitchat) is a peer-to-peer messaging application built exclusively for Apple's ecosystem. Understanding what platforms BitChat supports is essential before attempting to build, test, or distribute the application. The project uses Swift Package Manager's platform declarations to guarantee consistent compilation across supported operating systems while preventing builds for incompatible targets.

## Platform Requirements in Package.swift

### Root Package Declaration

The primary platform constraints reside in the repository's top-level **Package.swift**. According to the source code at lines 8-11, the package declares:

```swift
platforms: [
    .iOS(.v16),
    .macOS(.v13)
]

```

This configuration enforces a **minimum deployment target** of iOS 16 for iPhone and iPad devices, and macOS 13 (Ventura) for Mac computers. The `swift-tools-version: 5.9` specified in the package manifest ensures that modern Swift concurrency features and framework APIs are available on both platforms. Attempting to compile the `bitchat` executable target for any platform not listed—such as watchOS, tvOS, or Linux—results in an immediate build error.

### Local Package Consistency

The repository structure includes local package dependencies that mirror these exact constraints. Both **BitLogger/Package.swift** (lines 7-10) and **BitFoundation/Package.swift** (lines 7-10) replicate the same `platforms` array. This consistency ensures that every library in the dependency graph compiles for the identical iOS and macOS targets, preventing linker errors or unavailable API mismatches when building the final app bundle.

## Cross-Platform Architecture

BitChat uses a **single executable product** architecture defined in the root Package.swift. While the core networking, cryptography, and Bluetooth Low Energy (BLE) handling code remains platform-agnostic Swift, the UI layer adapts to each operating system through compile-time conditional blocks.

### Conditional Compilation for Platform-Specific Code

The codebase leverages Swift's conditional compilation directives to handle platform differences without maintaining separate codebases. In [`bitchat/Views/MessageListView.swift`](https://github.com/permissionlesstech/bitchat/blob/main/bitchat/Views/MessageListView.swift) at line 290, the implementation branches between iOS and macOS APIs:

```swift
#if os(iOS)
import UIKit
// iOS-specific device handling
#elseif os(macOS)
import AppKit
// macOS-specific application handling
#endif

```

This pattern allows the same source file to participate in both the iOS `.ipa` build and the macOS `.app` bundle generation, ensuring feature parity while respecting each platform's human interface guidelines.

## Platform-Specific Implementation Examples

### Adaptive UI with SwiftUI

The following SwiftUI view demonstrates how BitChat renders platform-appropriate interfaces at runtime:

```swift
import SwiftUI

struct PlatformSpecificView: View {
    var body: some View {
        #if os(iOS)
        Text("Running on iOS")
            .font(.title2)
        #elseif os(macOS)
        Text("Running on macOS")
            .font(.title)
        #endif
    }
}

```

This shared view file compiles for both targets, automatically applying iOS typography on iPhone/iPad and macOS styling on Mac devices.

### Conditional Framework Imports

BitChat conditionally imports system frameworks based on the target platform:

```swift
#if os(iOS)
import UIKit
// Access UIDevice battery state and orientation
#elseif os(macOS)
import AppKit
// Access NSApplication and window management
#endif

```

These directives appear throughout the **bitchat/** source directory, particularly in view controllers and platform service wrappers, ensuring that platform-specific APIs are only compiled for their respective targets.

## Summary

- BitChat officially supports **iOS 16 and later** and **macOS 13 (Ventura) and later**.
- Platform constraints are defined in the root **Package.swift** and mirrored in local packages including **BitLogger** and **BitFoundation**.
- The Swift Package Manager enforces these restrictions at compile time, rejecting builds for watchOS, tvOS, or Linux.
- The codebase utilizes **conditional compilation** (`#if os(iOS)`) to branch between UIKit and AppKit while sharing core logic.
- Distribution produces **.ipa** files for iOS deployment and **.app** bundles for macOS distribution from identical source code.

## Frequently Asked Questions

### Does BitChat support watchOS or tvOS?

No, BitChat does not support watchOS or tvOS. The Package.swift explicitly lists only `.iOS(.v16)` and `.macOS(.v13)` in its platforms array. The Swift Package Manager will generate a build error if you attempt to select a watchOS or tvOS scheme in Xcode, as the executable target `bitchat` is not configured for those SDKs.

### Can I run BitChat on Linux or Windows?

No, BitChat cannot run on Linux or Windows. The application depends on Apple-specific frameworks including SwiftUI, CoreBluetooth, and CryptoKit. Additionally, the Package.swift platform declarations restrict the compiler to Apple SDKs only, making cross-platform compilation impossible without significant architectural changes.

### Why does BitChat require iOS 16 and macOS 13 specifically?

These minimum versions align with Swift 5.9 language features and modern concurrency APIs used throughout the networking layer. The Package.swift specifies `.iOS(.v16)` and `.macOS(.v13)` to guarantee availability of structured concurrency, async/await patterns, and specific SwiftUI view modifiers that the application requires to function correctly.

### How does BitChat handle UI differences between iPhone and Mac?

The implementation uses conditional compilation directives (`#if os(iOS)` and `#elseif os(macOS)`) within shared Swift files. For example, [`bitchat/Views/MessageListView.swift`](https://github.com/permissionlesstech/bitchat/blob/main/bitchat/Views/MessageListView.swift) contains platform-specific logic around line 290 that imports UIKit for iOS devices and AppKit for Mac computers. This approach allows the project to maintain a single codebase while rendering native interface elements appropriate to each platform's design patterns.