Showcase new features after an app update similar to Pages, Numbers and Keynote.

Related tags

Utility swift ios ios11
Overview

WhatsNew

CircleCI Version License Platform

Description

WhatsNew automatically displays a short description of the new features when users update your app. This is similar to what happens in Apple's apps like Pages, Numbers, Keynote, iMovie and TestFlight.

Simply list your new features (with optional icons), customize the appeareance and when to show it (only on major updates for example).

Usage

Run the example project from the Example directory and check out ViewController.swift.

import WhatsNew

let whatsNew = WhatsNewViewController(items: [
	WhatsNewItem.image(title: "Nice Icons", subtitle: "Completely customize colors, texts and icons.", image: #imageLiteral(resourceName: "love")),
	WhatsNewItem.image(title: "Such Easy", subtitle: "Setting this up only takes 2 lines of code, impressive you say?", image: #imageLiteral(resourceName: "threed")),
	WhatsNewItem.image(title: "Very Sleep", subtitle: "It helps you get more sleep by writing less code.", image: #imageLiteral(resourceName: "night")),
	WhatsNewItem.text(title: "Text Only", subtitle: "No icons? Just go with plain text."),
])
whatsNew.presentIfNeeded(on: self)

Some of the apps using WhatsNew in production are:

If you're using WhatsNew in your app, please let me know and I will make sure to add it to the list of apps that use this library!

Customizations

There are a bunch of customizable properties with corresponding documentation.

/// This method allows marking the current version as presented. This is useful in case you want to avoid showing WhatsNew to first-time users for example.
public static func markCurrentVersionAsPresented()

/// Defines when to present the What's New view controller. Check the `PresentationOption` enum for more details.
public var presentationOption: PresentationOption = .always

/// Closure invoked when the user dismisses the view controller.
public var onDismissal: (() -> Void)?

/// Text of the top title.
public var titleText: String = "What’s New"

/// Color of the top title.
public var titleColor: UIColor = .black

/// Font of the top title.
public var titleFont: UIFont = UIFont.systemFont(ofSize: 26, weight: .bold)

/// Title color of the feature items.
public var itemTitleColor: UIColor = .black

/// Subtitle color of the feature items.
public var itemSubtitleColor: UIColor = .black

/// Title font of the feature items
public var itemTitleFont: UIFont = UIFont.systemFont(ofSize: 20, weight: .bold)

/// Subtitle font of the feature items
public var itemSubtitleFont: UIFont = UIFont.systemFont(ofSize: 16, weight: .regular)

/// Text of the bottom button that dismisses the view controller.
public var buttonText: String = "Continue"

/// Text color of the bottom button that dismisses the view controller.
public var buttonTextColor: UIColor = .yellow

/// Text font of the bottom button that dismisses the view controller.
public var buttonFont: UIFont = UIFont.systemFont(ofSize: 16, weight: .regular)

/// Background color of the bottom button that dismisses the view controller.
public var buttonBackgroundColor: UIColor = .black

Installation

WhatsNew is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'WhatsNew'

You can also use Carthage if you prefer. Add this line to your Cartfile.

github "BalestraPatrick/WhatsNew"

Android version available here.

Requirements

iOS 9.0 and Swift 4.0 are required.

Author

I'm Patrick Balestra. Email: [email protected] Twitter: @BalestraPatrick.

License

WhatsNew is available under the MIT license. See the LICENSE file for more info.

Comments
  • Update constraints for the xibs

    Update constraints for the xibs

    Hi, I've updated some of the constraints inside the various xibs:

    1. In WhatsNew xib I've set the stack view to track the scroll view width and not the main view one to fix the landscape mode and I've set leading and trailing constraints to the main title to allow it to wrap on multiple lines. I've also removed an unnecessary view inside the the stack view for the main title.
    2. In WhatsNewItemTextView xib I've update the only constraint that still track the superview directly and not the safe area
    3. In WhatsNewItemImageView xib I've updated the title constrains to allow it to wrap on multiple lines and not be truncated at the first one

    I've also a question, I've seen that the continue button is inside a subview that is not much of utility and that has a negative top distance to the scroll view. There is a reason for that or is some kind of drag error?

    opened by JGiola 8
  • fix handle major version changes correctly

    fix handle major version changes correctly

    This is my suggestion for a fix. I wanted to create some test cases for this but could not find any unit testing targets. As I do not want to change your project structure too much with this simple fix I did not add all that too. Please think about adding testing!

    This is related to #22

    opened by funkenstrahlen 7
  • Dynamic Type warnings with iOS 9 deployment

    Dynamic Type warnings with iOS 9 deployment

    Hi,

    I updated your library to the latest version and I get a few warning regarding dynamic type. Specifically you enabled dynamic type with iOS 9 deployment target but the dynamic type is available only on iOS 10 or later.

    Here is a screenshot of the warnings.

    screen shot 2017-11-11 at 21 49 45
    opened by zarzonis 7
  • repeat appearing

    repeat appearing

    I tried this code but it keeps coming again and again when I click on continue. I implement it in viewDidAppear

    let whatsNew = WhatsNewViewController(items: [
                   WhatsNewItem.image(title: "Nice Icons", subtitle: "Completely customize colors, texts and icons.", image: #imageLiteral(resourceName: "lgoJaee")),
                   WhatsNewItem.image(title: "Such Easy", subtitle: "Setting this up only takes 2 lines of code, impressive you say?", image: #imageLiteral(resourceName: "lgoJaee")),
                   WhatsNewItem.image(title: "Very Sleep", subtitle: "It helps you get more sleep by writing less code.", image: #imageLiteral(resourceName: "lgoJaee")),
                   WhatsNewItem.text(title: "Text Only", subtitle: "No icons? Just go with plain text."),
                   ])
               whatsNew.titleText = "What's New"
               whatsNew.buttonText = "Continue"
               present(whatsNew, animated: true, completion: nil)
    

    how can I dismiss it and never appear again?

    opened by AbdulazizAlmohsen 4
  • Could I write an Android edition?

    Could I write an Android edition?

    Hi, @BalestraPatrick ,

    Your library is so well-designed and amazing! I am an Android dev and could I write an Android edition? If the answer is positive and the android edition is done, I will express thanks to you in the main page of the lib.

    Looking forward to your reply. 😉

    opened by TonnyL 3
  • Rename didShow to markCurrentVersionAsPresented

    Rename didShow to markCurrentVersionAsPresented

    Rename didShow to markCurrentVersionAsPresented and expose it. Motivation behind this is there may be cases where it does not make sense to show "What's New" to a user and to have WhatsNew manage it.

    opened by benshippee 3
  • Rename presentation options

    Rename presentation options

    In my eyes the presentation option .always is not named very well because it suggests that the view is presented always. However it is only presented on every version update. This is why I suggest renaming. This does make the library more intuitive for new developers.

    opened by funkenstrahlen 2
  • add UserDefaults clear button

    add UserDefaults clear button

    Hi, I'm Japansese engineer.Thanks cool library.

    In the sample project, when I want to see it again, it is troublesome to erase the application. I created a clear button.

    Please check it if you like. Thanks.

    opened by senseiphoneX 2
  • Add ability to set item image tint color.

    Add ability to set item image tint color.

    • Allows for changing item image tint color (for use with template images) via itemImageTintColor property on WhatsNewViewController instance.

    Example usage:

    let whatsNew = WhatsNewViewController(items: [ . . . ]) whatsNew.itemImageTintColor = .red whatsNew.presentIfNeeded(on: self)

    opened by erusso1 1
  • .majorVersion presentation option does not display update info when previous version is nil

    .majorVersion presentation option does not display update info when previous version is nil

    My app does receive a major update to 3.0 and I did add WhatsNew now to show users what changed.

    However when I configure the WhatsNewController to be displayed for .majorVersion it is not displayed because your method to calculate whether to display the update message is incorrect. It fails if the user defaults key for previous version is not set.

    opened by funkenstrahlen 1
  • Add bottom button constraints variation

    Add bottom button constraints variation

    Now the bottom space constraints for the continue button will shrink to 10 points when in compact height. This will address issue #10 but for me the wrong horizontal scroll in landscape is not appearing. Can you try again if it is indeed fixed with my PR #7 ?

    opened by JGiola 1
  • System button type on MacOS

    System button type on MacOS

    There's an issue on MacOS where custom button styles don't look good because the system style is applied to it. It'd be great if you can add a method to change the button style (property is read only so it should be done during init) or just set it to "custom" out of the box (in the WhatsNew storybaord).

    Screen Shot 2022-03-16 at 11 17 23
    opened by kiritokatklian 0
  • Implement demo with

    Implement demo with "gallerize" package

    I noticed that this package has an online demo. It would be great if you implement it with gallerize. It is a package used to make http://gallery.flutter.dev like demo site.

    opened by daadu 0
  • "onDismissal" closure doesn't execute when vc is dismissed with swipe

    In my parent view controller, I've defined the following:

    whatsNew.onDismissal = didDismissWhatsNew

    But the closure only executes when the user clicks on the "continue" button at the bottom of the WhatsNew vc. It does not execute when the user dismisses the page sheet by swiping downward.

    I'm no professional, but until someone figures out a generalized solution, I figured I'd share what I did to get around this.

    Manual workaround:

    First I modify my parent view controller to adhere to the UIAdaptivePresentationControllerDelegate protocol:

    class PlannerViewController: UIViewController, UIAdaptivePresentationControllerDelegate {

    Then in the parent vc's function where I initialize the WhatsNew vc, prior to calling whatsNew.presentIfNeeded(on: self), I set "self" as the presentationController delegate:

    whatsNew.presentationController?.delegate = self

    Lastly, in the parent VC, I implement the presentationControllerDidDismiss(_:) method and call the same dismissal action that I defined for whatsNew.onDismissal:

      func presentationControllerDidDismiss(_ presentationController: UIPresentationController) {
        didDismissWhatsNew()
      }
    
    opened by lukemmtt 0
Releases(0.4.6)
Owner
Patrick Balestra
Infra Engineer at @spotify. Previously at @n26, @Scandit, BCG DV and FIFA TMS.
Patrick Balestra
Generates a random photo after you click the button

Swift Random Photo Generator Generates a random photo after you click the button! Things you need to do ?? clone this repository git clone https://git

Tsuen Hsueh 2 Aug 16, 2022
Handling dimensional numbers with physical units in Swift made easy.

Dimensional arithmetics in Swift This package provides an easy and natural way of dealing with physical sizes. Performing complex arithmetics or unit

Niklas Nickel 1 May 27, 2022
[iOS] Animated analog flip numbers like airport/train-station displays (SwiftUI)

A SwiftUI FlipNumberView A small universal (iOS + macOS) app displaying the current time with a flip animation. This is still WIP and doesn't support

M Emrich 6 Dec 6, 2022
Checks if there is a newer version of your app in the AppStore and alerts the user to update.

YiAppUpdater Checks if there is a newer version of your app in the AppStore and alerts the user to update. Installation YiAppUpdater is available thro

coderyi 4 Mar 17, 2022
Simple app install/update behavior detection.

App-Update-Tracker AppUpdateTracker is a simple, lightweight iOS library intended to determine basic app install/update behavior. The following is a l

Aaron 25 Dec 13, 2022
Updeto is a simple package that help update checker for iOS Apps

Updeto is a simple package that will help you to check if the currently installed version is the same as the latest one available on App Store.

Manuel Sánchez 8 Jul 8, 2022
Customize and resize sheets in SwiftUI with SheeKit. Utilise the power of `UISheetPresentationController` and other UIKit features.

SheeKit Customize and resize sheets in SwiftUI with SheeKit. Utilise the power of UISheetPresentationController and other UIKit features. Overview She

Eugene Dudnyk 67 Dec 31, 2022
An open source Instapaper clone that features apps and extensions that use native UI Components for Mac and iOS.

TODO: Screenshot outdated Hipstapaper - iOS and Mac Reading List App A macOS, iOS, and iPadOS app written 100% in SwiftUI. Hipstapaper is an app that

Jeffrey Bergier 51 Nov 15, 2022
Butterfly is a lightweight library for integrating bug-report and feedback features with shake-motion event.

Butterfly is a lightweight library for integrating bug-report and feedback features with shake-motion event. Goals of this project One of th

Zigii Wong 410 Sep 9, 2022
Async+ for Swift provides a simple chainable interface for your async and throwing code, similar to promises and futures

Async+ for Swift provides a simple chainable interface for your async and throwing code, similar to promises and futures. Have the best of both worlds

async_plus 132 Jan 6, 2023
A functional tool-belt for Swift Language similar to Lo-Dash or Underscore.js in Javascript

Dollar Dollar is a Swift library that provides useful functional programming helper methods without extending any built in objects. It is similar to L

Ankur Patel 4.2k Jan 2, 2023
Scaffold is a tool for generating code from Stencil templates, similar to rails gen.

?? Scaffold Scaffold is a tool for generating code from Stencil templates, similar to rails gen. It happens to be written in Swift, but it can output

Joshua Kaplan 33 Apr 5, 2022
Backports the new @Invalidating property wrapper to older platforms

ViewInvalidating A property wrapper that backports the new @Invalidating property wrapper to older versions of iOS/tvOS/macOS. For more information on

Suyash Srijan 61 Nov 23, 2022
What's new in Swift 5.x

wnis Resources What's new in Swift? Swift CHANGELOG Swift Evolution Usage $ swift run What's new in Swift (5.0, 5.1, 5.2, 5.3, 5.4, 5.5, 5.6): Examp

Zach Eriksen 2 Apr 3, 2022
Verify New Zealand COVID Passes in iOS apps using Swift

NzCovidPass-Swift Swift library for verification of the NZ Covid Vaccination Pas

Gallagher Security 4 Jul 19, 2022
TypeStyle is a handy app for iPhone and iPad that generates text using different styles and decorations. It is a native Swift iOS app.

TypeStyle TypeStyle is a handy app for iPhone and iPad that generates text using different styles and decorations. It is a native Swift iOS app. Featu

Eugene Belinski 31 Dec 14, 2022
Mac app to change .ipa file app icons and display names

IPAEdit Mac app to change .ipa file app icon, display name, and app version to avoid updates Compatible with macOS 10.11+ Install To install either cl

Ethan Goodhart 23 Dec 28, 2022
A Flutter plugin (platform channel with Swift) to get the current app name and also bring our app to the front.

window_to_front A new flutter plugin project. Getting Started This project is a starting point for a Flutter plug-in package, a specialized package th

Minas Giannekas 1 Nov 13, 2021