Swiftpack.co - Package - cellular/remoteconfiguration-swift

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
                    }
                ]
            }
        ]
    }
}

Github

link
Stars: 3

Used By

Total: 0

Releases

Update CellularNetworking dependency - 2020-05-12 09:29:45

6.0.1 - 2020-03-19 14:34:33

Conform UpdateContext to Equatable

Restructured project in favour of SPM - 2019-08-28 11:59:27

  • Restructured project in favour of SPM