Git Product home page Git Product logo

updateminder's Introduction

UpdateMinder

UpdateMinder is a Swift Package for easily managing app update prompts. It provides a seamless way to prompt users for mandatory and optional updates based on the app version.

Features

  • Automatic version comparison to determine if an update is needed.
  • Customizable alerts for optional updates.
  • modal presentation for mandatory updates with customizable SwiftUI views. (formSheet) (disabled swipe to dismiss)

Installation

To install UpdateMinder, you can use Swift Package Manager. Add the following to your Package.swift:

dependencies: [
    .package(url: "https://github.com/GlennBrann/UpdateMinder.git", .upToNextMajor(from: "1.0.0"))
]

Usage

Configuration

Configure UpdateMinder with the appropriate settings for your app.

  1. You can load via a json config file i.e via firebase remote config
{
    "latestVersion": "2.0.0",
    "isMandatory": true,
    "isNonMandatoryAlertVisible": true,
    "appStoreID": "123456",
    "updateMessage": "Exciting new features are available in version 2.0.0!",
    "alertTitle": "Important Update!",
    "alertMessage": "Please update to version 2.0.0 to continue using the app.",
    "alertCTA": "Update now"
}

Checking for Updates

To check for updates and present the update prompt:

let config = loadJsonConfig(filename: "AppUpdateConfig")

.task {
    await UpdateMinder.shared.checkForUpdates(
        withConfig: config
    )
}

Passing a custom Mandatory Update View

let config = loadJsonConfig(filename: "AppUpdateConfig")

.task {
    await UpdateMinder.shared.checkForUpdates(
        withConfig: config,
        customView: {
             VStack {
                Text("Update available")
             }
        }
    )
}

updateminder's People

Contributors

glennbrann avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.