mirror of
https://github.com/sudosylabs/vnidrop.git
synced 2026-08-07 19:29:57 +02:00
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.
This commit is contained in:
@@ -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"
|
|
||||||
),
|
|
||||||
]
|
|
||||||
)
|
|
||||||
@@ -18,9 +18,8 @@ apple/
|
|||||||
UI/Theme|Components|Navigation|Feedback|Shell/
|
UI/Theme|Components|Navigation|Feedback|Shell/
|
||||||
Platform/ # pickers, QR, NFC, share/export, per-OS file services
|
Platform/ # pickers, QR, NFC, share/export, per-OS file services
|
||||||
Resources/ # Localizable.xcstrings, Info.plist, entitlements, assets
|
Resources/ # Localizable.xcstrings, Info.plist, entitlements, assets
|
||||||
Tests/ # XCTest (ported progress-derivation assertions)
|
Tests/ # XCTest bundle (VniDropTests target)
|
||||||
Package.swift # builds VniDrop/ as a library for CLI build/test
|
project.yml # XcodeGen spec for the iOS/macOS app and test targets
|
||||||
project.yml # XcodeGen spec for the iOS/macOS app target
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## Build & run
|
## 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
|
ignored `apple/Local.xcconfig` and override the signing settings there, including
|
||||||
the development team.
|
the development team.
|
||||||
|
|
||||||
## Command-line typecheck & tests
|
## Typecheck & tests
|
||||||
|
|
||||||
`Package.swift` builds the same sources as a library (minus the `@main` entry),
|
The Xcode project is the only build definition: it owns the UI, its package
|
||||||
so the shared logic can be checked and unit-tested without Xcode:
|
dependencies, and the `VniDropTests` bundle (module `VniDrop`, which is what the
|
||||||
|
tests import). Everything runs through `xcodebuild`:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cd apple
|
make check-apple # iOS simulator unit tests
|
||||||
swift build # macOS
|
make build-apple-macos # unsigned macOS build (typecheck)
|
||||||
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)"
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
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
|
## Generated / ignored artifacts
|
||||||
|
|
||||||
`build-core.sh` produces build outputs that are gitignored (see `apple/.gitignore`):
|
`build-core.sh` produces build outputs that are gitignored (see `apple/.gitignore`):
|
||||||
@@ -106,8 +108,7 @@ Rust crate itself is never changed.
|
|||||||
## System frameworks
|
## System frameworks
|
||||||
|
|
||||||
The Rust core (iroh network stack) links `SystemConfiguration`, `Security`, and
|
The Rust core (iroh network stack) links `SystemConfiguration`, `Security`, and
|
||||||
`libresolv`. These are declared in both `Package.swift` (for CLI build/test) and
|
`libresolv`. These are declared in `project.yml` for the app target.
|
||||||
`project.yml` (for the app target).
|
|
||||||
|
|
||||||
## Parity & scope
|
## Parity & scope
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user