Resource ConfigurationSection.swift for arm64 iOS and macOS

Discussion in 'Spigot Plugin Development' started by Kynoani, Jul 10, 2021.

  1. I am going to dump this here in case anyone else finds this very useful as I do.
    I personally hate learning new programming languages and operating systems.
    This resource allows you to use a sqlite database as a yaml configuration essentially in a twist.

    Initialization
    Code (Text):
    let config = FileConfiguration(fileName: "config")
    let section = config.getConfigurationSection()
    How to read and write
    Code (Text):
    section.set("abc", 123)

    print(section.getInt("abc")) // 123
    How to read a list of keys
    Code (Text):
    // Example preliminary memory assignment
    section.set("users.kynoani.lastMessage", "Hello World")
    section.set("users.md5.lastMessage", "Hello")

    // Example reading keys
    let keys = section.getConfigurationSection("users").getKeys(false)

    for key in keys {
        print(key)   // kynoani
                     // md5
    }
    And much more... as much as Bukkit supports with their yaml configuration

    This works perfectly and is being used in production apps
    I will not be providing any support for this resource, if you encounter any issues you must fix them yourself
    This resource requires that you have SQLite.swift correctly included in your Xcode project

    Required source code and LICENSE.txt can be viewed from https://github.com/netsirkl64/ConfigurationSection-SQLite-Swift