YASU

1.1.0

Yet Another Swift Utility (Package)
Eisenhuth/YASU

What's New

v1.1.0

2024-02-13T00:21:40Z

What's Changed

  • using HTTPClient instead of URLSession by @Eisenhuth in #1

Full Changelog: v1.0.1...v1.1.0

Yet Another Swift Utility

Workflow Badge

packaging some basic boilerplate functions.

import YASU

loading some json data from a url

@State private var myDataType: MyDataType?

var body: some View {

    let myDataSourceUrl = URL(string: "https://my.datasource.url")!
    
    VStack {
        Text(myDataType.SomePropertyValue ?? "")
    }
    .task{
        await myDataType = loadData(myDataSourceUrl)
    }
}

loading some json from the bundle

var myDataType: MyDataType = Bundle.main.decode("MyBundledJsonFile.json")

var body: some View {    
    VStack {
        Text(myDataType.SomePropertyValue)
    }
}

Description

  • Swift Tools 5.9.0
View More Packages from this Author

Dependencies

Last updated: Sun Oct 20 2024 00:13:40 GMT-0900 (Hawaii-Aleutian Daylight Time)