SwiftyPick
?

?

Documentation

Useful Swift code samples, extensions, functionalities and scripts to cherry-pick and use in your projects.

Purpose

The idea behind this project is not to be a pod that users import into their own projects, but rather a collection of useful ideas, well-organized and documented, to cherry-pick as needed into another projects. Every new piece of functionality will have a proper document explaining it’s usage under the Documentation directory.

Installation

SwiftLint

brew install swiftlint

Configure the Git Hooks

git config core.hooksPath .githooks

CocoaPods

Run pod install on the root of the project

Open SwiftyPick.xcworkspace with Xcode

Features
?

Code

Extensions

Features

  • SwiftGen: Get autogenerated instances of colors, images, and localized strings.

Networking

  • // TODO //

Testing

  • Xcode Test Plans: Configure different test plans in your project in order to test different configurations.

UI

  • // TODO //

Process

Danger

  • Danger: Configure Danger and add a Github Action to run the script on every PR.

Documentation

  • Jazzy: Configure Jazzy to get autogenerated html files for documentation.

Fastlane

  • Fastlane: Configure Fastlane in your project and add a Github Action to run the tests on every PR to main.
  • Run Test Plans on Fastlane: Configure your fastfile to run different test plans.

Github

SwiftLint

  • SwiftLint: How to add and configure SwiftLint rules.

Scripts

TODOs

This is the list of things I want to add to the project in the near future:

  • Logger: Object to log useful information to the console (and to report to analytics/crashlytics)
  • NumberFormatter + Regional unit tests (ie: check the , or . separator for decimals/thousands depending on the region)
  • CurrencyFormatter + Regional unit tests
  • DateFormatter + Regional unit tests
  • Lightweight URLSession networking layer
  • Dynamic Fonts (For accessibility)
  • UITests layer using Page Object pattern
  • Schemes (prod/dev)
  • UserDefaults easy access / FeatureFlags using UserDefaults
  • UIView extension with some basic animations
  • UITableViewCell/UICollectionViewCell extension for register, dequeue, and cellReuseIdentifier
  • Firebase integration (Analytics/Crashlytics/AB Testing/Flags)
  • Custom Operators from the Advanced Swift book
  • GraphQL support
  • A tableview in the home, where each cell will be the entry point to each feature (ie: color palettes, networking call via http, networking via graphQL, UI components, animations, formatters, etc)
  • Settings view: dark mode, color palette, app icon, local feature flags, display backend calls for debug, change accessibility features, etc

Contributing

Check out the Contribution guide

GitHub

https://github.com/mdb1/SwiftyPick