Swiftpack.co - Swift Packages by marinofelipe

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.

Packages published by marinofelipe

marinofelipe/CurrencyText 3.0.0
Currency text field formatter available for UIKit and SwiftUI πŸ’ΆβœοΈ
⭐️ 211
πŸ•“ 1 year ago
πŸ”– Release Notes

Releases

The markdown parsing is broken/disabled for release notes. Sorry about that, I'm chasing the source of a crash that's been bringing this website down for the last couple of days.
SwiftUI CurrencyFormater binding
1 year ago
## Breaking Change `CurrencyTextFieldConfiguration.formatter` to be a `@Binding` property, which aims to propagate state changes when the formatter is updated, like on `formatter.currency` changes. When bumping to this release, users will have to update their `CurrencyTextField` usages passing a projected value for their formatters, prefixed with `$`. ```swift CurrencyTextField( configuration: .init( // ... formatter: $currencyFormatter ``` In order to update the bound formatter, it must be re-initialized with the desired properties, since the view update is only triggered when the Binding changes, in that case the formatter instance itself: ```swift CurrencyTextField( Picker( "Change currency", selection: $currency ) { ForEach( [ Currency.euro, Currency.dollar, Currency.brazilianReal, Currency.yen ], id: \.self ) { Text($0.rawValue).tag($0) } } .pickerStyle(.segmented) .onChange(of: currency) { newValue in currencyFormatter = .init { $0.currency = newValue // other props } } ``` For a full example, one case check the `SwiftUIExampleView.swift` on the `Example` app target, available in the `CurrencyText.xcworkspace`.
Fix formatter state to update on SwiftUI
1 year ago
Ensure state changes on `CurrencyFormatter` are propagated through `CurrencyTextField`. This should fix the reported bug #87.
Improved SwiftUI focus API
2 years ago
Added a new property to `CurrencyTextFieldConfiguration` called `hasFocus`, a `Binding<Bool?>` that can be used to control and observe focus/isFirstResponder changes for a `CurrencyTextField` wrapped `UITextField`. By default `hasFocus` is `nil`. The usage is as follows: ```swift struct MyView: View { @State private var hasFocus: Bool? // or this initially as true var body: some View { CurrencyTextField( configuration: .init( text: $text, hasFocus: $hasFocus, // ... ) ) .onAppear { hasFocus = true } } } ```
Release libraries for SwiftUI
2 years ago
This release added new libraries and API for formatting currency text in SwiftUI. For more detail please check the docs and the Example app. **Obs**: For now the SwiftUI libraries are only available for iOS given that the bridging between `UIKit` to `SwiftUI` required configuring an underlying `UITextField`. A future major version may provide `SwiftUI` support for all Apple platforms, in vanilla `SwiftUI` without the need to bridge from `UIKit`, whenever Apple provides us with API for fully controlling a `SwiftUI.TextField` selectedTextRange. ## Changes - Fixed CurrencyFormatter.unformatted(string:) when hasDecimals is true - Updated the ExampleApp with both UIKit and SwiftUI examples, and made it Storyboard-less - Increased min supported iOS version from `9.0` to `11.0` - Updated from Swift 5.0 to Swift 5.3 toolchain - Added a SwiftPackage library `CurrencyTextSwiftUI` and CocoaPods sub-spec `CurrencyTextField` that provides access to `SwiftUI.CurrencyTextField` and `CurrencyTextFieldConfiguration`
Improve experience when formatter has min/max set
3 years ago
- Fix #66 , by adjusting user inputed value to match formatter's defined range (min and/or max) only when the text field resign as first responder. This improves the experience by allowing users to freely type their currency text, without the value being e.g. initially adjusted from `$ 0.01` to `$ 2.00` - when `currencyFormatter's min is 2`. - Small improvements on the release lanes.
Add passthrough delegate
4 years ago
- Add passthrough delegate - Bump two Gems to fix vulnerabilities - Organize git hub supporting files - Ignore DS_Store
Support SPM
4 years ago
- Add support to use Currency Text via **Swift Package Manager**. - Fix security vulnerability by bumping _rubyzip_ from 1.2.4 to 1.3.0.
Improve initial selected text range
4 years ago
- Update example layout. - Improve initial selected text range to be always after the last number, and to always at the end of the string. - Update CI to Xcode 11.
Improve selected text range
4 years ago
## PATCH - Update bundle dependencies; - Improve and adjust selected text range when the currency symbol is at the end of the text. - Update Example's layout.
Swift 5
4 years ago
## PATCH - Update to Swift 5. - Update fastlane and CI to Xcode 10.2.
iOS
marinofelipe/http_client 0.0.4
🌐(🚜) Easy to use HTTPClient(s) built on top of URLSession and available for Combine
⭐️ 2
πŸ•“ 3 years ago
πŸ”– Release Notes

Releases

The markdown parsing is broken/disabled for release notes. Sorry about that, I'm chasing the source of a crash that's been bringing this website down for the last couple of days.
Tiny tiny patch
3 years ago
- Just some syntax improvements suggested by @pietrocaselani.
Tiny improvements
3 years ago
* Make it possible to set custom **Port** when building http requests * Add a `.decoding(_ error: DecodingError)` to HTTPResponseError and return it on CombineHTTPClient when decoding fails. This will make it possible for clients to better debug decoding issues.
Small fixes
3 years ago
* Remove unneeded HTTPRequestBuilder abstraction * Fix to compile tests * Update schemes to run tests in parallel and with random order
Initial version
3 years ago
Create two http client libraries. Both are packaged with shared HTTPClientCore, which provides common types and helpers such as HTTPRequestBuilder. Third library is a test support framework that mainly helps on unit testing and mocking the clients. ### HTTPClient A tiny wrapper around URLSession that makes it easier to do simple REST networking. ### CombineHTTPClient Provides a Promise-like API built on top of URLSession, Combine and its Foundation conveniences. ### HTTPClientTestSupport Helpers and mocks that can help on testing code that uses one of the clients.
iOS macOS

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics