Show What's New with SwiftUI.

Overview

SwiftNEWKit

Accelerated by Apple SwiftUI

CleanShot 2022-06-11 at 22 54 15@2x

Aims

Provide an easy way for Apple Developers to Show "What's New" to the end users.

Features

  • Auto trigger the .sheet from Version and/or Build increase
  • One-line coding
  • JSON compatible
  • Versioning
  • Local available
  • Simple Binding
  • Simple Model
  • Open source

Version

GitHub release (latest by date) GitHub release (latest by date including pre-releases)

swiftui-128x128_2x

Environment

Xcode Local

Tested on Latest Compatible
iOS 16 > 14
iPadOS 16 > 14
macOS 13 > 11

Xcode Cloud

Tested on Compatible
Xcode 13.4 (13F17a)
macOS 12.3.1 (21E258)

Guide

English | 中文 | Feel free to add new language(s) via pull requests

Get Started

Full Tutorial: https://bit.ly/3NOvJB8

Setup

Steps Description Screenshot
1 Navigate to root project CleanShot 2022-06-11 at 17 39 39@2x
2 Select Project CleanShot 2022-06-11 at 17 39 48@2x
3 Select Package Dependencies CleanShot 2022-06-11 at 17 39 53@2x
4 Click + and paste https://github.com/1998code/SwiftNEWKit to the searchbox CleanShot 2022-06-11 at 17 39 32@2x
5 Create a new file called data.json You may copy the JSON sample below.

Major Usage

  1. Import first.
import SwiftNEW
  1. Then, paste this code inside body or any some View.
SwiftNEW(show: $showNew, align: $align, color: $color, size: $size, label: $label, labelImage: $labelImage)

State

var Suggested Options Type
showNew false false, true Bool
align .center .leading, .center, .trailing HorizontalAlignment
color .accentColor All Colors Supported Color
size "normal" "invisible", "mini", "normal" String
labelColor Color(UIColor.systemBackground) All Colors Supported Color
label "Show Release Note" All Strings String
labelImage "arrow.up.circle.fill" All SF Symbols String
Samples:
@State var showNew: Bool = false
@State var align: HorizontalAlignment = .center
@State var color: Color = .accentColor
@State var size: String = "normal"
@State var label: String = "Show Release Note"
@State var labelImage: String = "arrow.up.circle.fill"

JSON

Structure / Model

public struct Vmodel: Codable, Hashable {
    var version: String
    var new: [Model]
}
public struct Model: Codable, Hashable {
    var icon: String
    var title: String
    var subtitle: String
    var body: String
}

Sample

68747470733a2f2f76616c696461746f722e737761676765722e696f2f76616c696461746f723f75726c3d68747470733a2f2f7261772e67697468756275736572636f6e74656e742e636f6d2f4f41492f4f70656e4150492d53706563696669636174696f6e2f6d61737465722f6578616d706c65732f76

[
    {
        "version": "1.1",
        "new": [
            {
                "icon": "pencil.and.ruler.fill",
                "title": "Apple Pencil 3",
                "subtitle": "Supported",
                "body": "Available for the new iPad Pro"
            },
            {
                "icon": "hammer.fill",
                "title": "Bug fixes",
                "subtitle": "Broken UI",
                "body": "Available for iOS 16, iPadOS 16, macOS 13"
            },
            {
                "icon": "square.and.arrow.down.fill",
                "title": "Local File",
                "subtitle": "Supported",
                "body": "Direct load via local storage. Super fast!"
            },
            {
                "icon": "macpro.gen3.server",
                "title": "Serverless",
                "subtitle": "Design",
                "body": "Free and open source! Created by Ming with ❤️‍🔥"
            },
            {
                "icon": "arrow.triangle.pull",
                "title": "Contribute",
                "subtitle": "Together",
                "body": "Pull requests and make it better for everyone!"
            }
        ]
    }
]

Developer Note

  • Please report bugs in Issues section.
  • If you want to discuss future roadmap or contribution, please find on Discussions.

Preview

IMG_3472 IMG_3471
Light Native Dark Native

Demo

Path: ./Demo

License

MIT

You might also like...
An iOS app that visually clones Spotify's app and consumes the official Spotify's Web API to show(and play) songs, podcasts, artists and more.
An iOS app that visually clones Spotify's app and consumes the official Spotify's Web API to show(and play) songs, podcasts, artists and more.

SpotifyClone An iOS app that visually clones Spotify's app and consumes the official Spotify's Web API to show(and play) songs, podcasts, artists and

Swift iOS app to track when your favorite tv show airs next 📆
Swift iOS app to track when your favorite tv show airs next 📆

Upcoming TV Swift iOS app to track when your favorite tv show airs next 📆 Requirements iOS 13 TMdB API key Credits TMdB Contact github.com/dkhamsing

StackOverflowFeed - Simple app that show feed with questions from StackOverflow, using Stack Exchange API

StackOverflowFeed Simple app that show feed with questions from StackOverflow, u

IMC - App developed to show the user's BMI
IMC - App developed to show the user's BMI

IMC Swift Aplicativo que o usuário digita seu peso e sua idade e tem como result

A swift package(SPM) with iOS UI component that loads and displays images from remote urls or local assets and displays in a slide-show form with auto scroll feature.

MDBannersView A swift package with an iOS UI component that loads and displays images from remote urls, local assets and displays in a slide-show form

CountryList - iOS app to show country info
CountryList - iOS app to show country info

CountryList iOS app to show country info Overview 'CountryList App' fetch and di

Show off your GitHub contributions from your lock screen 📱
Show off your GitHub contributions from your lock screen 📱

GitHubContributionsiOS V2 NOTICE: V2 is published. It is a complete rewrite using SwiftUI and Catalyst. Source code are now hosted on the version/2.x

Get location of user and show near cities and weather of the cities for next 6 days. (iOS)

technical-assignment-Weather-App This project written in Swift by Emre Kılınc You need to have Xcode installed. Please open weather_app.xcworkspace wi

An example project to demonstrate the new scripting capabilities of Shortcuts For Mac.
An example project to demonstrate the new scripting capabilities of Shortcuts For Mac.

Scripting Shortcuts Test Project This simple project is designed to test the new scripting capabilities introduced in the Shortcuts app in macOS Monte

Comments
  • [ImgBot] Optimize images

    [ImgBot] Optimize images

    Beep boop. Your images are optimized!

    Your image file size has been reduced by 36% 🎉

    Details

    | File | Before | After | Percent reduction | |:--|:--|:--|:--| | /Demo/What's New?/Assets.xcassets/AppIcon.appiconset/ios-marketing.png | 179.82kb | 100.74kb | 43.98% | | /Demo/What's New?/Assets.xcassets/AppIcon.appiconset/[email protected] | 10.33kb | 8.08kb | 21.77% | | /Demo/What's New?/Assets.xcassets/AppIcon.appiconset/[email protected] | 9.25kb | 7.39kb | 20.18% | | /Demo/What's New?/Assets.xcassets/AppIcon.appiconset/[email protected] | 7.30kb | 5.87kb | 19.58% | | /Demo/What's New?/Assets.xcassets/AppIcon.appiconset/[email protected] | 7.97kb | 6.43kb | 19.32% | | /Demo/What's New?/Assets.xcassets/AppIcon.appiconset/[email protected] | 5.70kb | 4.79kb | 15.98% | | /Demo/What's New?/Assets.xcassets/AppIcon.appiconset/[email protected] | 5.70kb | 4.79kb | 15.98% | | /Demo/What's New?/Assets.xcassets/AppIcon.appiconset/[email protected] | 4.40kb | 3.70kb | 15.79% | | /Demo/What's New?/Assets.xcassets/AppIcon.appiconset/[email protected] | 5.08kb | 4.29kb | 15.39% | | /Demo/What's New?/Assets.xcassets/AppIcon.appiconset/[email protected] | 3.45kb | 3.05kb | 11.70% | | /Demo/What's New?/Assets.xcassets/AppIcon.appiconset/[email protected] | 3.23kb | 2.89kb | 10.60% | | /Demo/What's New?/Assets.xcassets/AppIcon.appiconset/icon-76.png | 2.84kb | 2.63kb | 7.39% | | /Demo/What's New?/Assets.xcassets/AppIcon.appiconset/icon-72.png | 2.73kb | 2.56kb | 6.23% | | /Demo/What's New?/Assets.xcassets/AppIcon.appiconset/[email protected] | 2.21kb | 2.10kb | 5.00% | | /Demo/What's New?/Assets.xcassets/AppIcon.appiconset/[email protected] | 2.12kb | 2.06kb | 2.63% | | /Demo/What's New?/Assets.xcassets/AppIcon.appiconset/icon.png | 2.04kb | 2.00kb | 1.87% | | | | | | | Total : | 254.16kb | 163.37kb | 35.72% |


    📝 docs | :octocat: repo | 🙋🏾 issues | 🏪 marketplace

    ~Imgbot - Part of Optimole family

    opened by imgbot[bot] 0
  • Restyle 2.0.0

    Restyle 2.0.0

    Automated style fixes for #2, created by Restyled.

    The following restylers made fixes:

    To incorporate these changes, merge this Pull Request into the original. We recommend using the Squash or Rebase strategies.

    NOTE: As work continues on the original Pull Request, this process will re-run and update (force-push) this Pull Request with updated style fixes as necessary. If the style is fixed manually at any point (i.e. this process finds no fixes to make), this Pull Request will be closed automatically.

    Sorry if this was unexpected. To disable it, see our documentation.

    opened by restyled-io[bot] 0
Releases(3.9.7)
Owner
MING
 Developer, UI Designer, Engineer WWDC Award Winner
MING
Simple app to show usage of SwiftUI and Combine

Podcasts Simple app to show usage of SwiftUI and Combine. The app shows a list of podcasts fetched from listennotes and it can be played. Status: Work

Alberto Penas Amor 27 Oct 4, 2022
Demo to show Air Quality Indices of Cities (in India) using SwiftUI and Combine Framework

AirQualityMonitoring-SwiftUI-Combine Demo to show Air Quality Indices of Cities (in India) using SwiftUI and Combine Framework Demo Video City List wi

Minhaz Panara 0 Jan 23, 2022
The demo project to show how to organize code to make SwiftUI apps easy to be test.

TestableApp I combined the idea to use functional programming instead of an loader instance in ModelView(I prefer to think of it as a service) and Res

VictorK 2 Jan 7, 2022
Animal Crossing New Horizon companion app in SwiftUI

You can now download the app on the App Store! The best Animal Crossing New Horizons companion app! 最高の「あつまれ どうぶつの森」コンパニオンアプリ Animal Crossing New Hori

Thomas Ricouard 1.6k Dec 29, 2022
Beers is a simple experimental app implemented using the new amazing SwiftUI.

Beers is a simple experimental app implemented using the new amazing SwiftUI. The app shows a list of beers fetched from Punk API

Chris 27 Dec 20, 2022
Basic Todo list application built using the new SwiftUI framework and Core Data

Dub Dub Do - A sample TODO List Application in SwiftUI Updated for Xcode 11.5 This is a basic app that lets you create a list of todos, mark them as i

Stephen McMillan 67 Sep 28, 2022
A simple todo app which aims to demonstrate some new concepts from SwiftUI 3

TodoAppSwiftUI3 A simple todo app which aims to demonstrate some new concepts from SwiftUI 3 Description This is a simple todo app built to demonstrat

Roman Luzgin 50 Nov 1, 2022
A new property wrapper for SwiftUI ObservableObject.

SharedObject ?? @SharedObject is an alternative to @StateObject, @ObservedObject, @EnvironmentObject to handle ObservableObject. If you need to have m

Lorenzo Fiamingo 51 Dec 8, 2022
Examples of new SwiftUI framework

SwiftUI by Examples SwiftUI is a simple way to build user interfaces across all Apple platforms with the power of Swift. I'm going to fill the repo wi

Artem Novichkov 192 Dec 9, 2022
An iOS app demo to show list and detail screen of artworks.

Artworks iOS Demo Application Architecture MVP Clean Architecture (check Known Issues) Dependency Injection Features Localization Dark mode support Ba

Muhammad Adam 0 Dec 29, 2021