Swiftpack.co - Alkenso/SwiftConvenience as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by Alkenso.
Alkenso/SwiftConvenience 0.0.25
Swift Must Have Tools
⭐️ 9
🕓 Yesterday
iOS macOS watchOS tvOS
.package(url: "https://github.com/Alkenso/SwiftConvenience.git", from: "0.0.25")

SwiftConvenience

Convenient additions to Swift standard library that makes development pleasant.

Brief history

While participating in many projects (mostly macOS) I use the same tools and standard types extensions. Once I've decided stop to copy-paste code from project to project and make single library that covers lots of developer needs in utility code.

Content

Common

  • CancellationToken: track cancelled state of the tasks
  • CommonError: most common error types in developers' practice
  • Environment: runtime access to build environment: if debug, if testing, etc.
  • Some standard types extensions
  • Some utility types

Filesystem & Bundle

  • Bundle: convenience extensions
  • FileManager: recursive setAttributes and the same
  • FileEnumerator: Swift approach for deep enumeration of the filesystem
  • Temporary Directory: simple working with temporary files and directories

Low level

  • IOKitError: swift error wrapping IOKit statuses
  • Mach: mach utilities
  • POD: conformance popular C structs to Swift Equatable / Codable / etc
  • Unsafe: a bit more UnsafePointer... utilities

System & Hardware

  • DeviceInfo: platform-dependent information about device (model, serial, etc)
  • Process: convenience extensions

Wrappers & PropertyWrappers

  • Atomic
  • Box / Weak / WeakBox
  • Clamping: restrict value type to some bounds
  • Synchronized: object wrapper around value to provide thread-safety
  • Resource (RAII wrapper, smart pointer analog)

BinaryParsing

  • Utilities to serialize / deserialize things in binary format

Misc

  • WildcardExpression: same as RegularExpression, but for wildcards (?, *)
  • Transfromer: generic approach of transforming one value to another using multiple 'reducers'

Objective-C

  • NSXPCConnection: audit_token_t property
  • NSException: catching Obj-C exceptions from Swift code

Testing

  • convenient utilities used in XCTests

Other

You can also find Swift libraries for macOS / *OS development

  • sXPC: type-safe wrapper around NSXPCConnection and proxy object
  • sLaunchctl: register and manage daemons and user-agents
  • sMock: Swift unit-test mocking framework similar to gtest/gmock

GitHub

link
Stars: 9
Last commit: Yesterday
jonrohan Something's broken? Yell at me @ptrpavlik. Praise and feedback (and money) is also welcome.

Release Notes

Yesterday

New features

  • protocol RawComparable
  • process Signing information
  • obj-c @synchronized analog
  • ProgressValue type

Fixes & Improvements

  • FileManager.removeItemIfExists
  • Improve FileEnumerator filtering
  • fix SynchronousExecutor
  • remove using of private API

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