Swiftpack.co - danielsaidi/MockingKit as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by danielsaidi.
danielsaidi/MockingKit 1.1.0
MockingKit is a Swift-based library that lets you mock protocols and classes. It lets you register function results, invoke and inspect method calls etc.
⭐️ 52
🕓 7 weeks ago
iOS macOS watchOS tvOS
.package(url: "https://github.com/danielsaidi/MockingKit.git", from: "1.1.0")

MockingKit Logo

Version Swift 5.6 MIT License Twitter: @danielsaidi

About MockingKit

MockingKit is a Swift-based mocking library that makes it easy to mock protocols and classes, for instance when unit testing or mocking not yet implemented functionality.

MockingKit lets you register function results, invoke functions and inspect calls.

MockingKit doesn't put any restrains on your code or require you to structure it in any way. You don't need any setup or configuration. Just create a mock and you're good to go.

Supported Platforms

MockingKit supports iOS 9, macOS 10.10, tvOS 9 and watchOS 6.


MockingKit can be installed with the Swift Package Manager:


or with CocoaPods:

pod MockingKit

Getting started

To get started with MockingKit, have a look at this getting started guide.


The online documentation contains more information, code examples etc. and makes it easy to overview the various parts of the library.

Demo Application

This project contains a demo app that lets you explore MockingKit on iOS and macOS. To run it, just open and run Demo/Demo.xcodeproj.


You can sponsor this project on GitHub Sponsors or get in touch for paid support.


Feel free to reach out if you have questions or if you want to contribute in any way:


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


Stars: 52
Last commit: 1 week ago
jonrohan Something's broken? Yell at me @ptrpavlik. Praise and feedback (and money) is also welcome.

Release Notes

7 weeks ago

This version adds support for Swift concurrency and async functions.

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