Skip to content

1998code/SwiftNEWKit

Repository files navigation

SNK

SwiftNEW

Stable Beta Validate JSON Files codecov Swift Version Platforms License

English · 繁中 · 简中 · 粵語 · 日本語 · 한국어 · Français · Español

A modern, SwiftUI-native "What's New" presentation framework for all Apple platforms — animated gradient backgrounds, glass effects, remote data loading, and full RTL/localization support out of the box.

image

🎨 Gallery

Cover

🚀 Quick Start

1. Add the package in Xcode → File → Add Package Dependencies…

Important

Package URL

https://github.com/1998code/SwiftNEWKit

2. Add a data.json to your app bundle:

Tip

Sample release notes JSON

[
  {
    "version": "1.0",
    "new": [
      { "icon": "star.fill", "title": "Welcome", "subtitle": "Get Started", "body": "Thanks for downloading our app!" }
    ]
  }
]

3. Drop it in your view:

Note

Minimal SwiftUI integration

import SwiftNEW

struct ContentView: View {
    @State private var showNew = false
    var body: some View {
        SwiftNEW(show: $showNew)
    }
}

That's it — SwiftNEW auto-triggers when the app version changes.

✨ Features

Feature Since Description
⬆️ Remote Update Screen 6.5.0 Opt in with checkForUpdates; a newer remote JSON version shows an update screen with a customizable App Store action
🔁 Animated Icon Loop 6.4.0 Loop through SF Symbols with native replace transitions
🧾 Flexible Icon Schema 6.4.0 Define icons with icon, toIcon, or a full icons array
🎯 Default Glass Badge 6.4.0 Rounded glass icon badges give rows a softer default look
🌈 Gradient Icon Glyphs 6.4.0 Icon glyphs use a top-leading to bottom-trailing theme gradient
🧩 Refined Row Layout 6.4.0 Larger icons, tighter rows, and rounder action buttons
⬇️ Lower Continue Controls 6.4.0 Continue controls sit closer to the bottom for easier reach
🌊 Liquid Mesh Motion 6.4.0 meshStyle: .still or .liquid animated mesh backgrounds
🏷️ Custom Heading Prefix 6.4.0 Customize the heading title line with headingPrefix
🔍 In-Sheet Search 6.3.0 Filter the current release notes by title / subtitle / body
🛡️ Resilient Loading 6.3.0 Handles loading failures with an inline retry state instead of an endless spinner
🏷️ Customizable Heading 6.3.0 headingStyle: .version, .versionOnly, or .appName
🔢 Optional Build Number 6.3.0 Hide build number via showBuild: false
🎨 Floating Particles Effect 6.3.0 New .particles special effect (TimelineView + Canvas)
🎯 Flexible Presentations 6.2.0 .sheet, .fullScreenCover, .embed
🌈 Adaptive Text Color 6.2.0 Button text auto-contrasts with background
🛠️ Simplified Initializer 6.2.0 Direct values — no .constant() wrapping needed
🪟 Glass Morphism 5.5.0 Modern blur with customizable transparency
🌈 Mesh & Linear Gradients 5.3.0 Animated gradient backgrounds
🥽 visionOS Support 4.1.0 Native spatial computing
🔄 Auto-trigger 4.0.0 Shows automatically when version/build changes
🎄 Special Effects 3.9.0 .christmas snowfall, .particles rainbow
📱 Drop Notifications 3.5.0 iOS-style banner notifications
🔥 Firebase Realtime DB 3.0.0 Live content updates
🌐 Remote JSON 3.0.0 Load from any REST endpoint
📚 Version History 2.0.0 Browse all previous releases

📝 Notes

  • SwiftNEW stores its last-seen version/build using namespaced app storage keys: swiftnew.version and swiftnew.build.
  • Version comparison is string-safe, so non-numeric values such as 1.0-beta or 1.0b3 will not crash auto-triggering.
  • Passing checkForUpdates: true with a remote data URL enables update checks. If the highest remote subVersion (or version) is newer than the installed app version, SwiftNEW presents the Update screen instead of What's New and resolves the App Store destination from Apple's iTunes Lookup API using the app's bundle identifier. The primary action defaults to localized Download Now; use updateButtonTitle for custom verbatim text. Set allowsSkippingUpdate: false for a non-skippable update screen.

🧪 Testing & Coverage

SwiftNEW uses Apple's Swift Testing framework for package tests. Run coverage locally with Xcode 16 or newer:

swift test --enable-code-coverage
swift test --show-codecov-path

The GitHub Actions Xcode 16.3 job also runs Swift Testing with native SwiftPM code coverage enabled and uploads the report to Codecov. Codecov upload is non-blocking while coverage reporting is being established.

Feature Showcase

Mesh Gradient (5.3+) visionOS (4.1+)
Mesh visionOS
App Icon (3.9.6+) History (2.0+)
App Icon History
Light Dark
Light Dark

📚 Learn More

Guide Covers
Configuration All parameters, examples, data sources (local / remote / Firebase), data model
Platform Support & Installation Supported OS versions, requirements, feature matrix, SPM setup
Contributing Project structure, dev setup, PR guidelines, troubleshooting

📄 License

SwiftNEW is released under the MIT License — one of the most permissive open-source licenses.

Details
You can Use it in commercial apps (including paid App Store apps), modify it, redistribute it, and ship it inside closed-source software
📝 You must Keep the original copyright and license notice in your project
⚠️ No warranty The software is provided "as is" — the author is not liable for any issues arising from its use

See LICENSE for the full text.

💖 Supported By

Sponsor Resource
Digital Ocean Cloud infrastructure
Ask DeepWiki AI-powered docs Q&A

About

Show "Release Note" on SwiftUI [ AI Assistant available below ]

Topics

Resources

License

Code of conduct

Stars

269 stars

Watchers

2 watching

Forks

Sponsor this project

 

Packages

 
 
 

Contributors