# Cotton for the Mac: the menu-bar importer. ONE target, ONE scheme, both named# Cotton. `CottonMac.xcodeproj` is generated from this file (gitignored):## xcodegen generate --spec apps/cotton/Mac/project.yml# pnpm -s mac:cotton:build the whole app, signed (apps/cotton/scripts/build-cotton-mac.sh)## A separate project from `apps/cotton/project.yml`, whose iOS target is also# named Cotton. Nothing here imports a module of the Swift package: what the# app reuses from the old Mac host is copied into `Sources/`.## THE VERSION LIVES HERE AND NOWHERE ELSE: `MARKETING_VERSION` below. The# Info.plist reads it, and the popover's footer reads the Info.plist.## The core is `crates/cotton-mac-ffi`, a Rust static library: the Swift sees it# as the module `CottonMacFFI` through the crate's committed module map, and# links the archive the build script copies to `build/rust/`. The pre-build# phase builds that archive when the build script has not already.name: CottonMacoptions: bundleIdPrefix: com.decemberfm deploymentTarget: macOS: "26.0" createIntermediateGroups: true xcodeVersion: "2650"attributes: ORGANIZATIONNAME: December FM# Sparkle, the updater (Sources/Updates.swift), pinned exactly.packages: Sparkle: url: https://github.com/sparkle-project/Sparkle exactVersion: "2.7.1"settings: base: MARKETING_VERSION: "0.11.0" CURRENT_PROJECT_VERSION: "11" SWIFT_VERSION: "6.0" MACOSX_DEPLOYMENT_TARGET: "26.0" ARCHS: arm64 ONLY_ACTIVE_ARCH: YES DEAD_CODE_STRIPPING: YEStargets: Cotton: type: application platform: macOS sources: - path: Sources# The launch agent that opens Cotton at login and again after a crash# (Sources/LoginItem.swift registers it with SMAppService.agent). - path: Resources/LaunchAgents buildPhase: copyFiles: destination: wrapper subpath: Contents/Library/LaunchAgents dependencies: - package: Sparkle settings: base: PRODUCT_NAME: Cotton PRODUCT_BUNDLE_IDENTIFIER: com.decemberfm.cotton.mac INFOPLIST_FILE: Resources/Info.plist GENERATE_INFOPLIST_FILE: NO CODE_SIGN_STYLE: Manual CODE_SIGN_IDENTITY: "-" CODE_SIGNING_REQUIRED: NO ENABLE_HARDENED_RUNTIME: NO ENABLE_USER_SCRIPT_SANDBOXING: NO SWIFT_STRICT_CONCURRENCY: complete SWIFT_INCLUDE_PATHS: $(SRCROOT)/../../../crates/cotton-mac-ffi/include LIBRARY_SEARCH_PATHS: $(SRCROOT)/build/rust OTHER_LDFLAGS: - -lcotton_mac_ffi - -framework - CoreServices - -framework - Security - -liconv preBuildScripts: - name: Rust core (cotton-mac-ffi) basedOnDependencyAnalysis: false script: |# The build verb builds the archive first and says so; a bare# `xcodebuild` builds it here. if [ "${COTTON_RUST_PREBUILT:-0}" = 1 ] && [ -f "$SRCROOT/build/rust/libcotton_mac_ffi.a" ]; then exit 0 fi exec bash "$SRCROOT/../scripts/build-cotton-mac.sh" --rust-onlyschemes: Cotton: build: targets: Cotton: all run: config: Debug archive: config: Release