Skip to content

Swift libraries for supporting the Model-View-ViewModel pattern on macOS, iOS and Linux

License

Notifications You must be signed in to change notification settings

foscomputerservices/FOSUtilities

Repository files navigation

FOSUtilities

Run unit tests Swift Package Manager

There are three libraries provided by the FOSUtilities package: FOSFoundation, FOSMVVM and FOSTesting.

Documentation

For guides, articles, and API documentation see the library's documentation on the Web or in Xcode.

Alpha Stability Warning

Please note that these libraries are currently a work in progress. The APIs are rapidly evolving and while the overall architecture is set, breaking changes will occur until 1.0 is released. The documentation is evolving, but the 'Getting Started' guidance is incomplete. Nonetheless, the implementations are stable and unit tests are in place to ensure proper code coverage and stability of all publicly-facing APIs. This warning will remain in place until I feel that these limitations are remedied. Please log any issues that you might find or suggestions for improvements.

FOSFoundation

FOSFoundation is a library of protocols, patterns, types and routines that I have found generally useful in my projects. Support areas include:

  • Extensions to URL for one-line REST-Style requests
  • Extensions to JSONEncoder and JSONDecoder for single-statement encoding/decoding of Codables
    • Along with standardized support for handling various Date and DateTime styles
  • Extensions to Collection for throttling execution of requests when servers restrict the number of requests per any time period
  • Extensions on String such as:
    • CamelCase / snake_case conversion
    • Hexadecimal String to/from UInt64, Int64, UInt, and Int
    • Cleaning and standardizing user-provided input
    • Generating random and unique Strings
    • Swift Range support
    • String obfuscation/revealing (e.g., ROT 13/ROT 47)

For guides, articles, and API documentation see the library's documentation on the Web or in Xcode.

FOSMVVM

FOSMVVM is a library that implements the Model-View-ViewModel pattern for binding SwiftUI projects to Vapor web services.

For guides, articles, and API documentation see the library's documentation on the Web or in Xcode.

FOSTesting

FOSTestingUtilities is a package of testing patterns, types and routines that I have found generally useful in my projects.

For guides, articles, and API documentation see the library's documentation on the Web or in Xcode.

Swift Package Manager

FOSUtilities supports the Swift Package Manager. To include FOSUtilities in your project add the following to your Package.swift file:

.package(url: "[email protected]:foscomputerservices/FOSUtilities.git", branch: "main"),

To use one of the libraries, add one or more entry in the dependencies list of a target in your Package.swift file:

.target(
    name: "MyTarget",
    dependencies: [
        .product(name: "FOSFoundation", package: "FOSUtilities"),
        .product(name: "FOSMVVM", package: "FOSUtilities")
        // ...
    ]
),
.testTarget(
    name: "MyTests",
    dependencies: [
        .byName(name: "MyTarget"),
        .byName(name: "FOSFoundation"),
        .byName(name: "FOSMVVM"),
        .byName(name: "FOSTesting"),
        .product(name: "Testing", package: "swift-testing")
    ]
)

Contributing

All contributions are welcome! Please see CONTRIBUTING.md for more details.

Maintainers

This project is maintained by David Hunt owner of FOS Computer Services, LLC.

License

FOSUtilities is under the Apache License. See the LICENSE file for more information.

About

Swift libraries for supporting the Model-View-ViewModel pattern on macOS, iOS and Linux

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published