Skip to content

Commit 62e6071

Browse files
committed
Added docs to the Interpose type
1 parent f39ab2b commit 62e6071

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

Sources/InterposeKit/Interpose.swift

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,16 @@
44

55
import ObjectiveC
66

7-
/// Interpose is a modern library to swizzle elegantly in Swift.
7+
/// The entry point for using InterposeKit to hook Objective-C methods in Swift.
8+
///
9+
/// The `Interpose` namespace provides the main interface for building and applying method hooks
10+
/// with a block-based API. It supports both class-wide and per-object hooks.
11+
///
12+
/// Use `prepareHook` to create a hook in the pending state to apply later, or `applyHook` to build
13+
/// and activate it immediately. Once applied, a hook can be reverted.
14+
///
15+
/// The method to be hooked must be available to the Objective-C runtime. In Swift, this requires
16+
/// marking the method as `@objc dynamic`.
817
public enum Interpose {
918

1019
// ============================================================================ //

0 commit comments

Comments
 (0)