Files
bitchat/localPackages/Tor/Package.swift
3a35b3acc2 Modularization: Extract Tor into a separate module (#602)
* Extract Tor into a separate module

* Add Tor package as a dependency for iOS & macOS targets

* Move `tor-nolzma.xcframework` inside Tor

* Remove `libz` from Frameworks as its linked in Tor

* Remove stray `.gitkeep` from macOS target membership

* Fix missing import and access control for modularized Tor

- Add import Tor to NetworkActivationService
- Make TorManager.shutdownCompletely() public for external access

* Fix tor-nolzma.xcframework structure for Xcode builds

- Add missing Info.plist files to all framework slices
- Restructure macOS framework to use deep bundle format (Versions/)
- Keep iOS frameworks as shallow bundles (standard for iOS)

This fixes the Xcode build errors while maintaining SPM compatibility.

* Remove stale xcframework references from Xcode project

Xcode cleaned up old direct references to tor-nolzma.xcframework
since it's now managed internally by the Tor Swift package.

---------

Co-authored-by: jack <jackjackbits@users.noreply.github.com>
2025-10-02 11:53:34 +02:00

46 lines
985 B
Swift

// swift-tools-version: 5.9
import PackageDescription
let package = Package(
name: "Tor",
platforms: [
.iOS(.v16),
.macOS(.v13)
],
products: [
.library(
name: "Tor",
targets: ["Tor"]
)
],
dependencies:[
.package(path: "../BitLogger"),
],
targets: [
.target(
name: "Tor",
dependencies: [
.product(name: "BitLogger", package: "BitLogger"),
.target(name: "TorC"),
],
path: "Sources",
exclude: ["C"]
),
.target(
name: "TorC",
dependencies: [
.target(name: "tor-nolzma")
],
path: "Sources/C",
linkerSettings: [
.linkedLibrary("z")
]
),
.binaryTarget(
name: "tor-nolzma",
path: "Frameworks/tor-nolzma.xcframework"
),
]
)