mirror of
https://github.com/sudosylabs/vnidrop.git
synced 2026-08-05 10:29:58 +02:00
Add a focused .swiftlint.yml (custom rules only, no default style noise) flagging raw String(localized:) / LocalizedStringKey / systemName|systemImage literals, and wire it as a required pre-build phase that fails the build if SwiftLint is missing (brew install swiftlint). The phase prepends the Homebrew bin dirs since Xcode runs scripts with a minimal PATH. Runs clean on the current tree (0 violations).
115 lines
3.8 KiB
YAML
115 lines
3.8 KiB
YAML
# XcodeGen spec for the native SwiftUI VniDrop app (iOS/iPadOS/macOS).
|
|
# Regenerate the project with: xcodegen generate (run from apple/)
|
|
# Requires two generated inputs first (both gitignored), before xcodegen:
|
|
# - Rust core: apple/scripts/build-core.sh debug
|
|
# - Localization: (cd localization && bun run src/cli.ts generate)
|
|
# -> VniDrop/Resources/Localizable.xcstrings, VniDrop/Generated/L10n.swift
|
|
name: VniDrop
|
|
options:
|
|
bundleIdPrefix: com.vnidrop
|
|
deploymentTarget:
|
|
iOS: "18.2"
|
|
macOS: "15.0"
|
|
createIntermediateGroups: true
|
|
|
|
# Project-wide build settings (applied to every target/config).
|
|
settings:
|
|
base:
|
|
# Strip unreachable code from release binaries.
|
|
DEAD_CODE_STRIPPING: YES
|
|
# Flag user-facing strings that aren't localized (the app ships 9 languages).
|
|
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED: YES
|
|
|
|
packages:
|
|
VnidropCore:
|
|
path: VnidropCore
|
|
SFSafeSymbols:
|
|
url: https://github.com/SFSafeSymbols/SFSafeSymbols
|
|
from: "5.3.0"
|
|
|
|
targets:
|
|
VniDrop:
|
|
type: application
|
|
supportedDestinations: [iOS, macOS]
|
|
configFiles:
|
|
Debug: Signing.xcconfig
|
|
Release: Signing.xcconfig
|
|
sources:
|
|
- path: VniDrop
|
|
excludes:
|
|
- "Resources/Info.plist"
|
|
- "Resources/VniDrop.entitlements"
|
|
- "Resources/**/.DS_Store"
|
|
settings:
|
|
base:
|
|
PRODUCT_BUNDLE_IDENTIFIER: com.vnidrop.app
|
|
MARKETING_VERSION: "0.1.0"
|
|
CURRENT_PROJECT_VERSION: "1"
|
|
GENERATE_INFOPLIST_FILE: NO
|
|
INFOPLIST_FILE: VniDrop/Resources/Info.plist
|
|
# Mirror the Info.plist identity so Xcode's Identity editor shows it too
|
|
# (the editor reads these build settings, not the manual plist).
|
|
INFOPLIST_KEY_CFBundleDisplayName: VniDrop
|
|
INFOPLIST_KEY_LSApplicationCategoryType: public.app-category.utilities
|
|
SWIFT_VERSION: "6.0"
|
|
SWIFT_STRICT_CONCURRENCY: complete
|
|
ENABLE_USER_SCRIPT_SANDBOXING: NO
|
|
ASSETCATALOG_COMPILER_APPICON_NAME: AppIcon
|
|
# App-wide accent (macOS sidebar selection, default control tints). The
|
|
# AccentColor asset mirrors VniDropColors.brandPurple — keep them in sync.
|
|
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME: AccentColor
|
|
configs:
|
|
debug:
|
|
CODE_SIGN_ENTITLEMENTS: VniDrop/Resources/VniDrop.entitlements
|
|
release:
|
|
CODE_SIGN_ENTITLEMENTS: VniDrop/Resources/VniDrop.entitlements
|
|
dependencies:
|
|
- package: VnidropCore
|
|
- package: SFSafeSymbols
|
|
- sdk: SystemConfiguration.framework
|
|
- sdk: Security.framework
|
|
- sdk: libresolv.tbd
|
|
preBuildScripts:
|
|
# Enforce the typed-resources convention (see .swiftlint.yml). Required: fails
|
|
# the build if SwiftLint is missing so the rules can't be silently bypassed.
|
|
- name: SwiftLint (typed resources)
|
|
basedOnDependencyAnalysis: false
|
|
script: |
|
|
# Xcode runs build phases with a minimal PATH that omits Homebrew, so add
|
|
# the common Homebrew bin dirs (Apple Silicon + Intel) before resolving it.
|
|
export PATH="/opt/homebrew/bin:/usr/local/bin:$PATH"
|
|
if which swiftlint >/dev/null; then
|
|
swiftlint lint --config "${SRCROOT}/.swiftlint.yml"
|
|
else
|
|
echo "error: SwiftLint not installed — run 'brew install swiftlint'"
|
|
exit 1
|
|
fi
|
|
|
|
VniDropTests:
|
|
type: bundle.unit-test
|
|
supportedDestinations: [iOS, macOS]
|
|
configFiles:
|
|
Debug: Signing.xcconfig
|
|
Release: Signing.xcconfig
|
|
sources:
|
|
- path: Tests
|
|
settings:
|
|
base:
|
|
GENERATE_INFOPLIST_FILE: YES
|
|
SWIFT_VERSION: "6.0"
|
|
SWIFT_STRICT_CONCURRENCY: complete
|
|
dependencies:
|
|
- target: VniDrop
|
|
|
|
schemes:
|
|
VniDrop:
|
|
build:
|
|
targets:
|
|
VniDrop: all
|
|
run:
|
|
config: Debug
|
|
test:
|
|
config: Debug
|
|
targets:
|
|
- VniDropTests
|