Skip to content

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

License

Notifications You must be signed in to change notification settings

mdb1/SwiftyPick

Repository files navigation

SwiftyPick 🦅🍒

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

Codebase documentation
Documentation

The documentation on this project is generated and updated automatically using Jazzy + Github Actions. For more info check the Jazzy docs on this repo.

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 //

UI Design Patterns

  • MVP: Use the MVP design pattern in your project.

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

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:

  • UserDefaults easy access / FeatureFlags using UserDefaults
  • Logger: Object to log useful information to the console (and to report to analytics/crashlytics)
  • Lightweight URLSession networking layer
  • PokedexViewController
    • Use MVP: PokedexPresenter, PokedexPresenting, PokedexPresentingDelegate
    • Use the new networking layer for the backend call
    • Unit test the presenter using a mock presenter to avoid the network call
  • NumberFormatter + Regional unit tests (ie: check the , or . separator for decimals/thousands depending on the region)
  • CurrencyFormatter + Regional unit tests
  • DateFormatter + Regional unit tests
  • Dynamic Fonts (For accessibility)
  • UITests layer using Page Object pattern
  • Run UI Tests against local json files to avoid using the network
  • Schemes (prod/dev)
  • UIView extension with some basic animations
  • Firebase integration (Analytics/Crashlytics/AB Testing/Flags)
  • Custom Operators from the Advanced Swift book
  • GraphQL support
  • 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

About

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

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published