/Utensils-Extensions

An extension for Utensils that uses newer Swift/iOS functionality.

Primary LanguageSwiftMIT LicenseMIT

Utensils+Extensions Cocoapod Version SPM Compatible Cocoapod Platform iOS Deployment Target License

This project extends Utensils, by allowing a higher deployment target with added functionality. This will allow consumers to continue to use Utentils with projects locked at an iOS deployment target of 12.0, while allowing newer features to be added reguarily with newer syntax and tooling.

Adding Utensils+Extensions to your project

CocoaPods

CocoaPods is the recommended way to add Utensils to your project.

  1. Add Utensils to your Podfile pod 'Utensils+Extensions'.
  2. Install the pod(s) by running pod install.
  3. Add Utensils to your files with import UtensilsExtensions.

Swift Package manager

Swift Package Manager can be used to add Utensils+Extensions the to your project:

  1. Add .package(url: "https://github.com/rbaumbach/Utensils+Extensions", from: "0.1.0")
  2. Follow intructions to add the Utensils package to your project.
  3. Add Utensils to your files with import Utensils_Extensions.

Clone from Github

  1. Clone repository from github and copy files directly, or add it as a git submodule.
  2. Add all files from Source directory to your project.

What tools are extended?

  • Extending the "pequeno" networker to include async versions of networking requests:
let networker = PequenoNetworking(baseURL: "https://dogsrbettahthancats.party")

let model = try await subject.get(endpoint: "/dogs",
                                  headers: ["version": "v1"],
                                  parameters: ["breed": "chihuahua"])
  • Also extending it to include combine versions of the networking requests:
let networker = PequenoNetworking(baseURL: "https://dogsrbettahthancats.party")

let future = subject.get(endpoint: "/get",
                         parameters: nil)

Note: Methods exist for both `Any` and codable json responses

## Testing

* Prerequisites: [ruby](https://github.com/sstephenson/rbenv), [ruby gems](https://rubygems.org/pages/download), [bundler](http://bundler.io)

This project has been setup to use [fastlane](https://fastlane.tools) to run the specs.

First, bundle required gems, install [Cocoapods](http://cocoapods.org). Next, inside the root project directory run:

```bash
$ bundle
$ bundle exec pod install

And then use fastlane to run all the specs on the command line:

$ bundle exec fastlane specs

Suggestions, requests, and feedback

Thanks for checking out Utensils+Extensions. Any feedback, suggestions and feedback can be can be sent to: github@ryan.codes, or opened as a github issue.