Skip to content

Commit 8470755

Browse files
committed
WIP
1 parent 4a7f5d0 commit 8470755

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,12 +347,14 @@ struct ContentView: View {
347347
Note for library maintainers
348348
----------------------------
349349

350-
If you maintain a SwiftUI Introspect-based library, make sure to declare your library's dependency on SwiftUI Introspect with a version range covering at least the last two major SwiftUI Introspect versions. This ensures that your library's dependency on SwiftUI Introspect doesn't clash with other libraries that may depend on different versions of SwiftUI Introspect, or with the target app's direct dependency on SwiftUI Introspect.
350+
If your library depends on SwiftUI Introspect, declare your dependency with a version range that spans at least the **last two major versions** rather than bumping straight to the latest one. This avoids conflicts when apps depend on SwiftUI Introspect directly or through multiple libraries at once. For example:
351351

352352
```swift
353353
.package(url: "https://github.com/siteline/swiftui-introspect", "1.3.0"..<"27.0.0"),
354354
```
355355

356+
Supporting a wider range is safe because SwiftUI Introspect is essentially a “finished” library: no new features will be added, only support for newer platform versions. Thanks to [`@_spi(Advanced)` imports](https://github.com/siteline/swiftui-introspect#introspect-on-future-platform-versions), it’s already future-proofed without requiring frequent version bumps.
357+
356358
Community projects
357359
------------------
358360

0 commit comments

Comments
 (0)