2 Commits

Author SHA1 Message Date
Daniel Arantes Loverde
0cceda1ad9 [docs] Trim README to intro + install + Documentation links
Remove the legacy inline usage snippets (background thread, nav completion
handler, networking example, 'Another components'). Replace the dead
signature GIF with the public GitHub mark linking to the resume repo.
2026-08-30 10:02:18 -03:00
Daniel Arantes Loverde
2cd52d3d12 [docs] Split reference docs into Extensions / SwiftUI / UIKit guides
Full per-symbol reference for every public extension, SwiftUI component, and
UIKit-era helper, as collapsible sections. README gets a Documentation table
linking all four guides; footer trimmed to the resume link. Docs only - no
code changes.
2026-08-29 21:27:49 -03:00

View File

@@ -1,94 +1,43 @@
![](loverde_company_logo_full.png) ![](loverde_company_logo_full.png)
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! # Loverde Co. Essentials
Essential Swift scripts, extensions, SwiftUI components, and UIKit-era helpers,
shared across Loverde Co. projects. Evolves with Swift, improves every release.
## Requirements ## Requirements
- iOS 15.* or newer, Swift 5.* or newer.
## Features - iOS 15 or newer · Swift 5 or newer
- [x] Many usefull scripts extensions
- [x] `API` — typed async networking + multipart uploads
- [x] SwiftUI components (`LCENavigationView`) and UIKit-era helpers
## Documentation ## Installation — Swift Package Manager
| Guide | Covers |
| --- | --- |
| **[API.md](Documentation/API.md)** | `API` networking — requests, multipart uploads, client certificates, error handling, and why it beats a hand-rolled `URLSession` |
| **[Extensions.md](Documentation/Extensions.md)** | Foundation / value-type / string / collection / numeric / date / crypto extensions and the `LCEssentials` namespace |
| **[SwiftUI.md](Documentation/SwiftUI.md)** | SwiftUI components and `View` helpers |
| **[UIKit.md](Documentation/UIKit.md)** | Programmatic layout & constraints, view/control extensions, navigation, tables, and drop-in components |
Installation
----
#### Swift Package Manager (SPM)
```swift ```swift
dependencies: [ dependencies: [
.package(url: "https://git.loverde.com.br/Loverde-Company-LTDA/LCEssentials", .upToNextMajor(from: "1.0.0")) .package(url: "https://git.loverde.com.br/Loverde-Company-LTDA/LCEssentials", .upToNextMajor(from: "2.0.0"))
] ]
``` ```
You can also add it via XCode SPM editor with URL: Or add it in Xcode via **File ▸ Add Package Dependencies…** with the URL:
``` swift ```
https://git.loverde.com.br/Loverde-Company-LTDA/LCEssentials https://git.loverde.com.br/Loverde-Company-LTDA/LCEssentials
``` ```
## Usage example
* Background Trhead
```swift
LCEssentials.backgroundThread(delay: 0.6, background: {
//Do something im background
}) {
//When finish, update UI
}
```
* NavigationController with Completion Handler
```swift
self.navigationController?.popViewControllerWithHandler(completion: {
//Do some stuff after pop
})
//or more simple
self.navigationController?.popViewControllerWithHandler {
//Do some stuff after pop
}
```
* Networking with `API`
```swift
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](Documentation/API.md)**
## Another components
> LCESnackBarView - **great way to send feedback to user**
And then import `LCEssentials ` wherever you import UIKit or SwiftUI
```swift ```swift
import LCEssentials import LCEssentials
``` ```
Any question or doubts, please send thru email ## Documentation
Daniel Arantes Loverde - <daniel@loverde.com.br> | Guide | Covers |
| --- | --- |
| **[API.md](Documentation/API.md)** | `API` networking — typed requests, multipart uploads, client certificates, error handling, and why it beats a hand-rolled `URLSession` |
| **[Extensions.md](Documentation/Extensions.md)** | Foundation / value-type / string / collection / numeric / date / crypto extensions and the `LCEssentials` namespace |
| **[SwiftUI.md](Documentation/SwiftUI.md)** | SwiftUI components (`LCENavigationView`) and `View` helpers |
| **[UIKit.md](Documentation/UIKit.md)** | Programmatic layout & constraints, view/control extensions, navigation, tables, and drop-in components (`LCSnackBarView`, image picker/zoom, GIF loading) |
[![Alt text](https://loverde.com.br/_signature/loverde_github_mail.gif "My Resume")](https://github.com/loverde-co/resume/) ---
Autor: Daniel Arantes Loverde Daniel Arantes Loverde — <daniel@loverde.com.br>
[<img src="https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png" width="28" alt="GitHub">](https://github.com/loverde-co/resume/)