6acec0ff3a22cf089e47785348788da44ef6493b
- Package.swift: .iOS(.v13) -> .iOS(.v15), .watchOS(.v6) -> .v8 (README already stated iOS 15; watchOS 8 needed for URLSession.upload(for:fromFile:)) - drop the iOS-13 uploadTask continuation bridge; both upload overloads now share one runUpload using session.upload(for:fromFile:delegate:) - remove now-redundant @available(iOS 15) from the progress overload and test - Documentation/API.md: drop iOS-version caveats

Loverde Co. Essentials Swift Scripts
This is a repository of essential scripts written in Swift for Loverde Co. used to save time on re-writing and keeping it on all other projects. So this Cocoapods will evolve with Swift and will improve with every release!
Requirements
- iOS 15.* or newer, Swift 5.* or newer.
Features
- Many usefull scripts extensions
API— typed async networking + multipart uploads. See Documentation/API.md
Installation
Swift Package Manager (SPM)
dependencies: [
.package(url: "https://git.loverde.com.br/Loverde-Company-LTDA/LCEssentials", .upToNextMajor(from: "1.0.0"))
]
You can also add it via XCode SPM editor with URL:
https://git.loverde.com.br/Loverde-Company-LTDA/LCEssentials
Usage example
- Background Trhead
LCEssentials.backgroundThread(delay: 0.6, background: {
//Do something im background
}) {
//When finish, update UI
}
- NavigationController with Completion Handler
self.navigationController?.popViewControllerWithHandler(completion: {
//Do some stuff after pop
})
//or more simple
self.navigationController?.popViewControllerWithHandler {
//Do some stuff after pop
}
- Networking with
API
struct User: Decodable, Sendable { let id: Int; let name: String }
let user: User = try await API.shared.request(
url: "https://api.example.com/users/{id}",
method: .get,
pathParams: ["id": "42"]
)
Full guide — requests, uploads, client certificates, error handling, and why it
beats a hand-rolled URLSession: Documentation/API.md
Another components
LCESnackBarView - great way to send feedback to user
And then import LCEssentials wherever you import UIKit or SwiftUI
import LCEssentials
Any question or doubts, please send thru email
Daniel Arantes Loverde - daniel@loverde.com.br
Autor: Daniel Arantes Loverde
Description
v2.0.0
Latest
Languages
Swift
100%
