A Swift library providing easy dependency injection for storyboard segues with type safety.
Perform is a Swift library that provides easy dependency injection for storyboard segues in iOS applications. It solves the problem of boilerplate code and type-unsafe segue handling by offering type-safe navigation and eliminating switch statements in `prepareForSegue`. Developers can configure segues with specific view controller types and prepare dependencies directly where segues are triggered.
iOS developers using storyboards and segues in Swift projects who want to improve code maintainability and reduce runtime errors in view controller navigation.
Developers choose Perform because it brings type safety to storyboard segues, automatically handles container view controllers, and eliminates messy switch statements, making segue management cleaner and more reliable.
Easy dependency injection for storyboard segues
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Automatically casts destination view controllers to the expected type and raises errors for mismatches, reducing runtime crashes as demonstrated in the README's type-safe segues section.
Searches through view controller hierarchies like navigation controllers to find the correct destination, eliminating boilerplate code for embedded VCs, as shown in the README example.
Allows preparing each destination view controller directly where the segue is performed, avoiding large switch blocks in prepareForSegue, making code cleaner and more maintainable.
Uses straightforward Swift extensions to define segues with identifiers and types, making setup easy with minimal code changes, as illustrated in the usage example.
Exclusively designed for storyboard segues; it becomes useless if you migrate to SwiftUI or programmatic navigation, limiting future-proofing.
Requires defining a Segue extension for each segue identifier, which can be repetitive and time-consuming in large projects with many segues.
Relies on Carthage or CocoaPods for installation, and the compatibility table shows it only supports older Swift versions (e.g., Swift 3.x), potentially requiring updates for modern projects.