Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Fully `@objc`-compatible, so Objective-C call sites work unchanged.
import YCFirstTime

YCFirstTime.shared.executeOnce({
showOnboarding()
// your one-time code, e.g. showOnboarding()
}, forKey: "onboarding.v1")
```

Expand Down
11 changes: 9 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,14 @@ State persists to `UserDefaults`.
- **Thread safety:** Not concurrent-safe per key. Call on the main thread.
- **Hosted API docs:** [swiftpackageindex.com/fabioknoedt/YCFirstTime/documentation/ycfirsttime](https://swiftpackageindex.com/fabioknoedt/YCFirstTime/documentation/ycfirsttime)

```swift
import YCFirstTime

YCFirstTime.shared.executeOnce({
// your one-time code, e.g. showOnboarding()
}, forKey: "onboarding.v1")
```

## Copy-paste integration

### 1. Add the dependency
Expand Down Expand Up @@ -60,9 +68,8 @@ No `use_frameworks!` required.
```swift
import YCFirstTime

// Onboarding that runs exactly once per install.
YCFirstTime.shared.executeOnce({
showOnboarding()
// your one-time code, e.g. showOnboarding()
}, forKey: "onboarding.v1")
```

Expand Down