From 86a8f0db22aa68401d233af7246dd9e276dae9e3 Mon Sep 17 00:00:00 2001 From: Dicky Darmawan Date: Sun, 28 Jun 2026 01:48:15 +0900 Subject: [PATCH 1/2] chore(release): prepare 1.0.0 Pin swift-atomics to exact 1.3.0, trim the privacy manifest to the APIs actually used (none required-reason), drop the unused app Info.plist, and cut the 1.0.0 changelog section. --- CHANGELOG.md | 9 ++-- Package.swift | 3 +- Sources/ScreenUtil/Info.plist | 53 ------------------------ Sources/ScreenUtil/PrivacyInfo.xcprivacy | 48 +-------------------- 4 files changed, 6 insertions(+), 107 deletions(-) delete mode 100644 Sources/ScreenUtil/Info.plist diff --git a/CHANGELOG.md b/CHANGELOG.md index f39f516..2271767 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,9 +5,7 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [Unreleased] - -> Pre-1.0; the public API is still changing. +## [1.0.0] - 2026-06-28 ### Changed - **Swift 6 language mode** (`swift-tools-version: 6.0`, `swiftLanguageModes: [.v6]`). @@ -41,6 +39,5 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - One dependency: [apple/swift-atomics](https://github.com/apple/swift-atomics), used for the lock-free scale-factor snapshot. ### Notes -- Pre-1.0: no version has been tagged yet, and the public API is still changing. - The current state is the platform-isolated Swift 6 engine described above; the - next tagged release will become `1.0.0`. \ No newline at end of file +- First tagged release. The platform-isolated Swift 6 engine described above is + the `1.0.0` public surface. \ No newline at end of file diff --git a/Package.swift b/Package.swift index 518ef62..924b6d3 100644 --- a/Package.swift +++ b/Package.swift @@ -16,7 +16,7 @@ let package = Package( ) ], dependencies: [ - .package(url: "https://github.com/apple/swift-atomics.git", from: "1.2.0") + .package(url: "https://github.com/apple/swift-atomics.git", exact: "1.3.0") ], targets: [ .target( @@ -25,7 +25,6 @@ let package = Package( .product(name: "Atomics", package: "swift-atomics") ], path: "Sources/ScreenUtil", - exclude: ["Info.plist"], resources: [ .copy("PrivacyInfo.xcprivacy") ], diff --git a/Sources/ScreenUtil/Info.plist b/Sources/ScreenUtil/Info.plist deleted file mode 100644 index 24cab7c..0000000 --- a/Sources/ScreenUtil/Info.plist +++ /dev/null @@ -1,53 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - $(PRODUCT_BUNDLE_PACKAGE_TYPE) - CFBundleShortVersionString - 1.0.0 - CFBundleVersion - 1 - CFBundleDisplayName - ScreenUtil - CFBundleDocumentTypes - - CFBundleURLTypes - - LSRequiresIPhoneOS - - MinimumOSVersion - 12.0 - NSHumanReadableCopyright - Copyright © 2025 Dicky Darmawan. All rights reserved. - NSPrincipalClass - NSApplication - UILaunchStoryboardName - LaunchScreen - UIMainStoryboardFile - Main - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UISupportedInterfaceOrientations~ipad - - UIInterfaceOrientationPortrait - UIInterfaceOrientationPortraitUpsideDown - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - - \ No newline at end of file diff --git a/Sources/ScreenUtil/PrivacyInfo.xcprivacy b/Sources/ScreenUtil/PrivacyInfo.xcprivacy index f5f8cdc..5397adc 100644 --- a/Sources/ScreenUtil/PrivacyInfo.xcprivacy +++ b/Sources/ScreenUtil/PrivacyInfo.xcprivacy @@ -3,56 +3,12 @@ NSPrivacyAccessedAPITypes - - - NSPrivacyAccessedAPIType - NSPrivacyAccessedAPICategoryUserDefaults - NSPrivacyAccessedAPITypeReasons - - CA92.1 - - - - NSPrivacyAccessedAPIType - NSPrivacyAccessedAPICategorySystemBootTime - NSPrivacyAccessedAPITypeReasons - - CA92.1 - - - - NSPrivacyAccessedAPIType - NSPrivacyAccessedAPICategoryDiskSpace - NSPrivacyAccessedAPITypeReasons - - CA92.1 - - - - NSPrivacyAccessedAPIType - NSPrivacyAccessedAPICategoryFileTimestamp - NSPrivacyAccessedAPITypeReasons - - CA92.1 - - - + NSPrivacyCollectedDataTypes NSPrivacyTracking NSPrivacyTrackingDomains - NSPrivacyCollectedDataTypesLinked - - NSPrivacyCollectedDataTypesPurposes - - NSPrivacyCollectedDataTypesTracking - - NSPrivacyAccessedAPITypesReasons - - CA92.1 - This app uses this API to provide responsive screen adaptation functionality based on device characteristics and screen dimensions. - - \ No newline at end of file + From 20dd8795dd6eb015cb754a031f192e4e90009f4a Mon Sep 17 00:00:00 2001 From: Dicky Darmawan Date: Sun, 28 Jun 2026 01:48:15 +0900 Subject: [PATCH 2/2] docs(release): add SPM + SPI publishing runbook and SPI config PUBLISHING.md walks accounts, repo settings, tag/release, and SPI submission. .spi.yml builds docs for the ScreenUtil target on Swift Package Index. --- .spi.yml | 5 +++ PUBLISHING.md | 93 +++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 98 insertions(+) create mode 100644 .spi.yml create mode 100644 PUBLISHING.md diff --git a/.spi.yml b/.spi.yml new file mode 100644 index 0000000..87a4df1 --- /dev/null +++ b/.spi.yml @@ -0,0 +1,5 @@ +version: 1 +builder: + configs: + - documentation_targets: + - ScreenUtil diff --git a/PUBLISHING.md b/PUBLISHING.md new file mode 100644 index 0000000..f786f39 --- /dev/null +++ b/PUBLISHING.md @@ -0,0 +1,93 @@ +# Publishing ScreenUtil + +How to cut a release of ScreenUtil to Swift Package Manager and Swift Package +Index. Run these yourself — they need your GitHub credentials. + +## Channels at a glance + +| Channel | Account needed | Mechanism | +|---------|----------------|-----------| +| Swift Package Manager | GitHub (repo admin) | git tag + GitHub Release | +| Swift Package Index | GitHub only | one-time PR to the package list | + +## 0. Prepare accounts (one-time) + +Do every box here **before** the first release. Tick each one off: + +- [ ] **GitHub** — you already own `Dicky019/ScreenUtil` with push + Release rights. Nothing to set up. Optional: install the `gh` CLI (`brew install gh && gh auth login`) to cut Releases from the terminal. +- [ ] **Swift Package Index** — no separate account; it authenticates with GitHub. Registration is a one-time submission of your repo URL via the "Add a Package" form on swiftpackageindex.com (or a PR to https://github.com/SwiftPackageIndex/PackageList). Do this once; later tags are picked up automatically. + +When both boxes are ticked you have every credential needed to publish — move on to the repo settings. + +## 0b. Repo settings (one-time, GitHub "About" panel or API) + +The repo's public metadata should match the package before you announce it. +Current state understates it (description says "iOS apps" only; license shows +"Other"). Fix via the repo's **About** gear on github.com, or the API below. + +- [ ] **Description** → broaden beyond iOS: + > Thread-safe responsive screen adaptation for Apple platforms (iOS, macOS, tvOS, watchOS). Scale UI from a fixed design size to the real device. Inspired by flutter_screenutil. +- [ ] **Topics** → add `macos`, `tvos`, `watchos`, `screen-adaptation`, `swift-package-manager` (keep existing `ios`, `swift`, `swiftui`, `uikit`, `responsive-design`). +- [ ] **Website / homepage** → set to the Swift Package Index page once §3 is done: `https://swiftpackageindex.com/Dicky019/ScreenUtil`. +- [ ] **License badge** → confirm the repo sidebar shows **Apache-2.0** (not "Other"). The `LICENSE` file is already standard Apache-2.0; if it still reads "Other", re-touch and push the file so GitHub re-runs license detection. + +Optional one-shot via API (needs the `gh` CLI authenticated): + +```bash +gh repo edit Dicky019/ScreenUtil \ + --description "Thread-safe responsive screen adaptation for Apple platforms (iOS, macOS, tvOS, watchOS). Scale UI from a fixed design size to the real device. Inspired by flutter_screenutil." \ + --homepage "https://swiftpackageindex.com/Dicky019/ScreenUtil" \ + --add-topic macos --add-topic tvos --add-topic watchos \ + --add-topic screen-adaptation --add-topic swift-package-manager +``` + +## 1. Pre-flight checklist + +- [ ] On `main`, working tree clean, latest pulled. +- [ ] `swift build` and `swift test` green (108 tests). +- [ ] `CHANGELOG.md` has a dated `## [1.0.0]` section. + +```bash +swift build && swift test +``` + +## 2. Tag and GitHub Release (SPM) + +SPM resolves straight from the git tag — tagging *is* the SPM release. + +```bash +git tag -a 1.0.0 -m "ScreenUtil 1.0.0" +git push origin 1.0.0 +``` + +Then create the GitHub Release from tag `1.0.0` (UI or `gh`): + +```bash +gh release create 1.0.0 --title "1.0.0" --notes-from-tag +``` + +Paste the `CHANGELOG.md` 1.0.0 notes into the release body. + +**Verify:** in a scratch dir, a package depending on `from: "1.0.0"` resolves: + +```bash +mkdir /tmp/su-check && cd /tmp/su-check && swift package init --type executable +# add .package(url: "https://github.com/Dicky019/ScreenUtil", from: "1.0.0") then: +swift build +``` + +## 3. Swift Package Index + +One-time: submit `https://github.com/Dicky019/ScreenUtil` via the Add-a-Package +form (or a PR to SwiftPackageIndex/PackageList). After that, SPI picks up new +tags automatically. `.spi.yml` already tells it to build docs for `ScreenUtil`. + +**Verify:** the package page shows a green build matrix and the `1.0.0` version. + +## 4. Post-release + +Reopen the changelog for the next cycle — add at the top of `CHANGELOG.md`: + +```markdown +## [Unreleased] +```