Fetch the update available status for iOS or macOS apps based on the bundle identifier.

Overview

AppUpdately

Fetch the update status for a given app bundle identifier, without the need of any remote configuration. Simply provide your app's bundle identifier and compare the resulting update status.

Usage

The fetcher automatically fetches the bundle identifier. You can use the following code example:

var cancellable: AnyCancellable?
cancellable = UpdateStatusFetcher().fetch { result in
    defer { cancellable?.cancel() }
    guard let status = try? result.get() else { return }

    switch status {
    case .upToDate:
        break
    case .updateAvailable(let version, let storeURL):
        // Use the information to present your update alert or view.
    }
}

Or with async/await:

Task {
    let fetcher = UpdateStatusFetcher()
    let status = try await fetcher.fetch()
    
    switch status {
    case .upToDate:
        break
    case .updateAvailable(let version, let storeURL):
        // Use the information to present your update alert or view.
    }
}

Installation

Swift Package Manager

Add https://github.com/AvdLee/AppUpdately.git within Xcode's package manager.

Manifest File

Add AppUpdately as a package to your Package.swift file and then specify it as a dependency of the Target in which you wish to use it.

import PackageDescription

let package = Package(
    name: "MyProject",
    platforms: [
       .macOS(.v10_15)
       .iOS(.v13)
    ],
    dependencies: [
        .package(url: "https://github.com/AvdLee/AppUpdately.git", .upToNextMajor(from: "1.0.0"))
    ],
    targets: [
        .target(
            name: "MyProject",
            dependencies: ["AppUpdately"]),
        .testTarget(
            name: "MyProjectTests",
            dependencies: ["MyProject"]),
    ]
)

License

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

You might also like...
Install and debug iPhone apps from the command line, without using Xcode

ios-deploy Install and debug iOS apps from the command line. Designed to work on un-jailbroken devices. Requirements macOS You need to have a valid iO

In-app feedback and bug reporting tool for apps.

Instabug iOS SDK Instabug is an in-app feedback and bug reporting tool for mobile apps. With just a simple shake, your users or beta testers can repor

PaymentApp - Payment App based on the MVVM architecture, with certain adaptations

PaymentApp Está basado en la arquitectura MVVM, con ciertas adaptaciones. Estruc

Unofficial Notion API SDK for iOS & macOS
Unofficial Notion API SDK for iOS & macOS

NotionSwift Unofficial Notion SDK for iOS & macOS. This is still work in progress version, the module interface might change. API Documentation This l

Open-source API Client for iOS, iPadOS, macOS. Built with SwiftUI
Open-source API Client for iOS, iPadOS, macOS. Built with SwiftUI

Yogu Open-source API Client for iOS, iPadOS, macOS. Built with SwiftUI 🚧 Yogu is currently in development, and not actually usable yet. Please DO NOT

gradle plugin for building Xcode Projects for iOS, watchOS, macOS or tvOS

gradle-xcodePlugin The gradle xcode plugin (gxp) makes it easier to build Xcode projects by specifying the build settings in a single configuration fi

A PocketBase client for iOS, macOS, watchOS, and tvOS

PocketBase A pure Swift client for interfacing with a PocketBase instance. Getting Started Development Environment Easiest way to get started with Poc

Project Flat iOS is the iOS client of Agora Flat open source classroom.
Project Flat iOS is the iOS client of Agora Flat open source classroom.

Agora Flat iOS Project flat is the iOS client of Agora Flat open source classroom. 中文 Features Open sourced front-end and back-end [Flat Web][flat-web

Native iOS implementation of RadarCOVID tracing client using DP3T iOS SDK

RadarCOVID iOS App Introduction Native iOS implementation of RadarCOVID tracing client using DP3T iOS SDK Prerequisites These are the tools used to bu

Comments
  • Just a question

    Just a question

    Hey love this thanks for making it.

    Just wondering if you've encountered this at all: https://github.com/mas-cli/mas/issues/336

    I want to use your library for an app that's only iOS so won't affect me personally but as I'd seen it thought I'd mention it just in case.

    Thanks again!

    opened by shaps80 2
Owner
Antoine van der Lee
iOS Developer @WeTransfer — Owner of SwiftLee
Antoine van der Lee
Home-assistant-swift-sdk - Used to integrate the Home Assistant APIs with your Swift-based apps.

home-assistant-swift-sdk This open-source library allows you to interact with a Home Assistant instance in your Swift-based (e.g., iOS, macOS, etc.) a

Alexander Golden 0 Dec 31, 2021
MbientLab 2 Feb 5, 2022
The official CovPass(-Check) iOS apps

CovPass / CovPass Check Einfach. Sicher. Papierlos. Mit der CovPass-App können Bürgerinnen und Bürger ihre Corona-Impfungen direkt auf das Smartphone

null 96 Dec 18, 2022
150,000+ stickers API & SDK for iOS Apps.

English | 한국어 Stipop UI SDK for iOS Stipop SDK provides over 150,000 .png and .gif stickers that can be easily integrated into mobile app chats, comme

Stipop, Inc. 19 Dec 20, 2022
Used to integrate the Facebook Platform with your iOS & tvOS apps.

Facebook SDK for iOS This open-source library allows you to integrate Facebook into your iOS app. Learn more about the provided samples, documentation

Meta 7.3k Jan 3, 2023
1Password Extension for iOS Apps

Retirement As 1Password continues to evolve on iOS we’ve been given new opportunities to take advantage of additions to the operating system that fulf

AgileBits 2.6k Jan 4, 2023
Project(s) for iOS mobile apps

Pre-work - Calculator tip app tip calculator is a tip calculator application for iOS. Submitted by: William Hiltz Time spent: 2 hours spent in total U

null 0 Jan 9, 2022
ResearchKit is an open source software framework that makes it easy to create apps for medical research or for other research projects.

ResearchKit Framework The ResearchKit™ framework is an open source software framework that makes it easy to create apps for medical research or for ot

null 5.5k Dec 26, 2022
CareKit is an open source software framework for creating apps that help people better understand and manage their health.

CareKit CareKit™ is an open source software framework for creating apps that help people better understand and manage their health. The framework prov

CareKit 2.3k Dec 27, 2022
Twitter Kit is a native SDK to include Twitter content inside mobile apps.

Twitter will be discontinuing support for Twitter Kit on October 31, 2018. Read the blog post here. Twitter Kit for iOS Background Twitter Kit is a na

Twitter Archive 674 Dec 18, 2022