From 5f5f7e0515bb4b18e06c7e306bd3462ba685d88c Mon Sep 17 00:00:00 2001 From: cdricms <36056008+cdricms@users.noreply.github.com> Date: Thu, 6 Aug 2026 17:21:51 +0200 Subject: [PATCH] chore(apple): drop the unused SwiftPM manifest Package.swift named its module VniDropApp while all 16 test files import VniDrop, and it never declared the SFSafeSymbols dependency that project.yml links, so neither swift build nor swift test worked. The Xcode project is already the only functioning build definition for the UI and the tests. Removes a second dependency list that had drifted, and corrects the README, which documented the CLI path as if it worked. --- apple/Package.swift | 43 ------------------------------------------- apple/README.md | 27 ++++++++++++++------------- 2 files changed, 14 insertions(+), 56 deletions(-) delete mode 100644 apple/Package.swift diff --git a/apple/Package.swift b/apple/Package.swift deleted file mode 100644 index 94b94ba..0000000 --- a/apple/Package.swift +++ /dev/null @@ -1,43 +0,0 @@ -// swift-tools-version:5.9 -import PackageDescription - -// Core/UI Swift sources built as a library so the shared logic can be typechecked -// and unit-tested from the command line (macOS). The iOS/macOS app target in the -// Xcode project links the same sources plus the app entry point. -let package = Package( - name: "VniDropApp", - defaultLocalization: "en", - platforms: [ - .iOS(.v16), - .macOS(.v13), - ], - products: [ - .library(name: "VniDropApp", targets: ["VniDropApp"]), - ], - dependencies: [ - .package(path: "VnidropCore"), - ], - targets: [ - .target( - name: "VniDropApp", - dependencies: [.product(name: "VnidropCore", package: "VnidropCore")], - path: "VniDrop", - // The @main entry belongs to the Xcode app target only; excluding it - // keeps this library free of a conflicting `_main` symbol for tests. - exclude: ["Resources", "App/VniDropApp.swift"], - // The Rust core (iroh network stack) links these system libraries. The - // Xcode app target must add the same frameworks under "Link Binary With - // Libraries" (SystemConfiguration, Security, libresolv). - linkerSettings: [ - .linkedFramework("SystemConfiguration"), - .linkedFramework("Security"), - .linkedLibrary("resolv"), - ] - ), - .testTarget( - name: "VniDropAppTests", - dependencies: ["VniDropApp"], - path: "Tests" - ), - ] -) diff --git a/apple/README.md b/apple/README.md index 6048bb7..600cff4 100644 --- a/apple/README.md +++ b/apple/README.md @@ -18,9 +18,8 @@ apple/ UI/Theme|Components|Navigation|Feedback|Shell/ Platform/ # pickers, QR, NFC, share/export, per-OS file services Resources/ # Localizable.xcstrings, Info.plist, entitlements, assets - Tests/ # XCTest (ported progress-derivation assertions) - Package.swift # builds VniDrop/ as a library for CLI build/test - project.yml # XcodeGen spec for the iOS/macOS app target + Tests/ # XCTest bundle (VniDropTests target) + project.yml # XcodeGen spec for the iOS/macOS app and test targets ``` ## Build & run @@ -72,19 +71,22 @@ opt in with `APPLE_CODE_SIGNING=YES`. For signed builds from Xcode, create the ignored `apple/Local.xcconfig` and override the signing settings there, including the development team. -## Command-line typecheck & tests +## Typecheck & tests -`Package.swift` builds the same sources as a library (minus the `@main` entry), -so the shared logic can be checked and unit-tested without Xcode: +The Xcode project is the only build definition: it owns the UI, its package +dependencies, and the `VniDropTests` bundle (module `VniDrop`, which is what the +tests import). Everything runs through `xcodebuild`: ```bash -cd apple -swift build # macOS -swift test # runs Tests/ (ported progress-derivation assertions) -# iOS typecheck: -swift build --triple arm64-apple-ios16.0-simulator --sdk "$(xcrun --sdk iphonesimulator --show-sdk-path)" +make check-apple # iOS simulator unit tests +make build-apple-macos # unsigned macOS build (typecheck) ``` +There is deliberately no SwiftPM manifest for the app. A second build definition +would duplicate the target's package dependencies, and the previous one had +already drifted out of sync with `project.yml` badly enough that neither +`swift build` nor `swift test` worked. + ## Generated / ignored artifacts `build-core.sh` produces build outputs that are gitignored (see `apple/.gitignore`): @@ -106,8 +108,7 @@ Rust crate itself is never changed. ## System frameworks The Rust core (iroh network stack) links `SystemConfiguration`, `Security`, and -`libresolv`. These are declared in both `Package.swift` (for CLI build/test) and -`project.yml` (for the app target). +`libresolv`. These are declared in `project.yml` for the app target. ## Parity & scope