Swiftpack.co -  cellular/remoteconfiguration-swift as Swift Package
Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
cellular/remoteconfiguration-swift
Dynamic configuration of iOS, tvOS or watchOS application using remote files.
.package(url: "https://github.com/cellular/remoteconfiguration-swift.git", from: "7.0.0")

RemoteConfiguration

Build Status Codecov CocoaPods Compatible Swift Version Platform

Dynamic configuration of iOS, tvOS or watchOS application using remote files.

Usage

TODO

Examples for the different update types

Optional Update: Optionally show alert

{
    "customKey1": "customValue1",
    "customKey2": "customValue2",
    "customKey3": "customValue3",

    "urlConfig": {
        "baseUrl": "http://some.host.com/api/"
    },

    "appUpdate": {
        "availableVersion": "1.2.3",
        "url": "https://itunes.apple.com/app",
        "type": "ignore"
    }
}

Recommended Update: Always show alert, allow skip

{
    "customKey1": "customValue1",
    "customKey2": "customValue2",
    "customKey3": "customValue3",

    "urlConfig": {
        "baseUrl": "http://some.host.com/api/"
    },

    "appUpdate": {
        "availableVersion": "1.2.3",
        "url": "https://itunes.apple.com/theApp",
        "type": "recommended",
        "frequency": "always",
        "localizedStrings": [
            {
                "languageCode": "de",
                "regionCode": "DE",
                "title": "Aktualisierung verfügbar",
                "text": "Es steht eine empfohlene Aktualisierung zur Verfügung. Möchten sie diese jetzt installieren?",
                "options": [
                    {
                        "title": "Nein"
                    },
                    {
                        "title": "Aktualisieren",
                        "isUpdateAction": true
                    }
                ]
            }
        ]
    }
}

Recommended Update, show alert only once

{
    "customKey1": "customValue1",
    "customKey2": "customValue2",
    "customKey3": "customValue3",

    "urlConfig": {
        "baseUrl": "http://some.host.com/api/"
    },

    "appUpdate": {
        "availableVersion": "1.2.3",
        "url": "https://itunes.apple.com/theApp",
        "type": "recommended",
        "frequency": "once",
        "localizedStrings": [
            {
                "languageCode": "de",
                "regionCode": "DE",
                "title": "Aktualisierung verfügbar",
                "text": "Es steht eine empfohlene Aktualisierung zur Verfügung. Möchten sie diese jetzt installieren?",
                "options": [
                    {
                        "title": "Nein"
                    },
                    {
                        "title": "Aktualisieren",
                        "isUpdateAction": true
                    }
                ]
            }
        ]
    }
}

Mandatory Update

{
    "customKey1": "customValue1",
    "customKey2": "customValue2",
    "customKey3": "customValue3",

    "urlConfig": {
        "baseUrl": "http://some.host.com/api/"
    },

    "appUpdate": {
        "availableVersion": "1.2.3",
        "url": "https://itunes.apple.com/theApp",
        "type": "mandatory",
        "localizedStrings": [
            {
                "languageCode": "de",
                "regionCode": "DE",
                "title": "Aktualisierung verfügbar",
                "text": "Es steht eine benötigte Aktualisierung zur Verfügung.",
                "options": [
                    {
                        "title": "Aktualisieren",
                        "isUpdateAction": true
                    }
                ]
            }
        ]
    }
}

Update for version 7.0.0

The dependency to CellularNetworking has been removed in this version.

The adapter to bind RemoteConfiguration to CellularNetworking has been moved to Example/Example/Controller/RemoteConfiguration+Adapter.swift. This adapter must be copied to the Application to bind RemoteConfiguration to CellularNetworking or any other networking clients like Alamofire or plain NSURLSession.

GitHub

link
Stars: 3
Last commit: 1 week ago

Ad: Job Offers

iOS Software Engineer @ Perry Street Software
Perry Street Software is Jack’d and SCRUFF. We are two of the world’s largest gay, bi, trans and queer social dating apps on iOS and Android. Our brands reach more than 20 million members worldwide so members can connect, meet and express themselves on a platform that prioritizes privacy and security. We invest heavily into SwiftUI and using Swift Packages to modularize the codebase.

Submit a free job ad (while I'm testing this). The analytics numbers for this website are here.

Release Notes

Update CellularNetworking dependency
1 year ago

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics