Swiftpack.co - bigMOTOR/Helpers as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
Tiny convenient code pieces that I'm tired of copy-paste across all my projects.
.package(url: "https://github.com/bigMOTOR/Helpers.git", from: "1.1.1")


Helpers Logo

Tiny convenient code pieces that I'm tired of copy-paste across all my projects.

Combine (HelpersCombine)

  • PublisherExtension:
func mapToVoid()
func mapToOptional()
func flatMapLatest()
func filterFalse() 
func filterTrue() 
func invert() 
func mapArray<T>(transform)
func shareReplay(bufferSize)    // Adapted from https://www.onswiftwings.com/posts/share-replay-operator/ 

In-App (HelpersIAP):

  • IAPProduct model;

Library (HelpersLibrary):

  • protocol AppDetails - provides app version and build number;
  • protocol AppStoreReview - provides dialog for Rate Us;
  • protocol DeviceDetails - provides device model, system version and device locale;
  • protocol ErrorLocalizedDescription;
  • Formatter - easy way to format numbers;
  • JsonObject - pretty typealias for [String: Any].

RxSwift Extensions (HelpersRxSwift):

func mapToVoid()
func filterFalse()
func filterTrue()
func invert()
func asDelayedActivity(_ delay: DispatchTimeInterval = .milliseconds(200))
func mapArray<T>(transform)
func fromAsync(_ block: { element in ... }) -> Single<Element>

Swift Stdlib Extensions (HelpersSwift):

subscript (safe index: Int) -> Element?
func subtract(_ other: [Element]) -> [Element]
func distance(to index: Index) -> Int 
  • work with unixMilliseconds;
  • date components;
  • beginning/end of date components;
  • adding date components;
  • comparison.
  • provides getter and setter for Codable values.

SwiftUI (HelpersSwiftUI):


func navigationBarColors(background: Color, tint: Color)
func onFrameChange(enabled isEnabled: Bool = true, frameHandler: @escaping (CGRect)->())
func shimmer(isActive: Bool = true, speed: Double = 0.15, angle: Angle = .init(degrees: 70), opacity: Double = 1.0)
func cornerRadius(_ radius: CGFloat, corners: UIRectCorner)
func onRotate(perform action: @escaping (UIDeviceOrientation) -> Void)
func rotateHandling(anchor: UnitPoint = .center)
func rotated(_ angle: Angle)
func blink(on state: Binding<Bool>, duration: Double = 0.1)
  • MailView.

The Composable Architecture (TCA) Helpers (HelpersTCA):

  • Lifecycle Reducer (problem statement);
  • Equatable VoidResult type;
  • Equatable WrappedError type.

Many thanks to Misha Markin at this part.

Rx and TCA Wrappers for RevenueCat Subscription Platform (RevenuecatRx or RevenuecatComposable)


Helpers available via:


Helpers is available under the MIT license. See the LICENSE file for more info.


Stars: 0
Last commit: 2 weeks ago

Ad: Job Offers

iOS Software Engineer @ Perry Street Software
Perry Street Software is Jack’d and SCRUFF. We are two of the world’s largest gay, bi, trans and queer social dating apps on iOS and Android. Our brands reach more than 20 million members worldwide so members can connect, meet and express themselves on a platform that prioritizes privacy and security. We invest heavily into SwiftUI and using Swift Packages to modularize the codebase.

Submit a free job ad (while I'm testing this). The analytics numbers for this website are here.

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