You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+20-15Lines changed: 20 additions & 15 deletions
Original file line number
Diff line number
Diff line change
@@ -59,10 +59,10 @@ All issue reports, feature requests, contributions, and GitHub stars are welcome
59
59
## Requirements
60
60
61
61
+ Xcode 12+
62
-
+ iOS 13+ (14+ Recommended)
63
-
+ macOS 10.15+ (11+ Recommended)
64
-
+ tvOS 13+ (14+ Recommended)
65
-
+ watchOS 6+ (7+ Recommended)
62
+
+ iOS 14+
63
+
+ macOS 11+
64
+
+ tvOS 14+
65
+
+ watchOS 7+
66
66
67
67
## SwiftUI 2.0 Compatibility
68
68
@@ -82,9 +82,7 @@ var body: some View {
82
82
}
83
83
```
84
84
85
-
Note: However, many differences behavior between iOS 13/14's is hard to fixup. And we may break some APIs (which are not designed to be public) to fixup it.
86
-
87
-
Due to maintain issue, in the future release, we will drop the iOS 13 supports and always match SwiftUI 2.0's behavior. And **v2.x** may be the last version support iOS 13.
85
+
Note: However, many differences behavior between iOS 13/14 is hard to fixup. Due to maintain issue, from SDWebImageSwiftUI v3.0, iOS 13 is no longer supported. We always match SwiftUI 2.0's behavior.
88
86
89
87
90
88
## Installation
@@ -174,7 +172,14 @@ var body: some View {
174
172
}
175
173
```
176
174
177
-
Note: For indicator, you can custom your own as well. For example, iOS 14/watchOS 7 introduce the new `ProgressView`, which can replace our built-in `ProgressIndicator/ActivityIndicator` (where watchOS does not provide).
175
+
Note: For indicator, you can custom your own as well. For example, iOS 14/watchOS 7 introduce the new `ProgressView`, which can be easily used via:
176
+
177
+
```swift
178
+
WebImage(url: url)
179
+
.indicator(.activity)
180
+
```
181
+
182
+
or you can just write like:
178
183
179
184
```swift
180
185
WebImage(url: url)
@@ -522,7 +527,7 @@ For caches, you actually don't need to worry about anything. It just works after
522
527
523
528
#### Using for backward deployment and weak linking SwiftUI
524
529
525
-
SDWebImageSwiftUI supports to use when your App Target has a deployment target version less than iOS 13/macOS 10.15/tvOS 13/watchOS 6. Which will weak linking of SwiftUI(Combine) to allows writing code with available check at runtime.
530
+
SDWebImageSwiftUI supports to use when your App Target has a deployment target version less than iOS 14/macOS 11/tvOS 14/watchOS 7. Which will weak linking of SwiftUI(Combine) to allows writing code with available check at runtime.
526
531
527
532
To use backward deployment, you have to do the follow things:
528
533
@@ -536,7 +541,7 @@ You should notice that all the third party SwiftUI frameworks should have this b
536
541
537
542
For deployment target version below iOS 12.2 (The first version which Swift 5 Runtime bundled in iOS system), you have to change the min deployment target version of SDWebImageSwiftUI. This may take some side effect on compiler's optimization and trigger massive warnings for some frameworks.
538
543
539
-
However, for iOS 12.2+, you can still keep the min deployment target version to iOS 13, no extra warnings or performance slow down for iOS 13 client.
544
+
However, for iOS 12.2+, you can still keep the min deployment target version to iOS 14, no extra warnings or performance slow down for iOS 14 client.
540
545
541
546
Because Swift use the min deployment target version to detect whether to link the App bundled Swift runtime, or the System built-in one (`/usr/lib/swift/libswiftCore.dylib`).
542
547
@@ -563,7 +568,7 @@ end
563
568
+ For CocoaPods user, you can skip the platform version validation in Podfile with:
564
569
565
570
```ruby
566
-
platform :ios, '13.0'# This does not effect your App Target's deployment target version, just a hint for CocoaPods
571
+
platform :ios, '14.0'# This does not effect your App Target's deployment target version, just a hint for CocoaPods
567
572
```
568
573
569
574
+ For SwiftPM user, SwiftPM does not support weak linking nor Library Evolution, so it can not deployment to iOS 12+ user without changing the min deployment target.
@@ -576,7 +581,7 @@ Add **all the SwiftUI code** with the available annotation and runtime check, li
@@ -638,7 +643,7 @@ SDWebImageSwiftUI has Unit Test to increase code quality. For SwiftUI, there are
638
643
639
644
However, since SwiftUI is State-Based and Attributed-Implemented layout system, there are open source projects who provide the solution:
640
645
641
-
+[ViewInspector](https://github.com/nalexn/ViewInspector): Inspect View's runtime attribute value (like `.frame` modifier, `.image` value). We use this to test `AnimatedImage` and `WebImage`. It also allows the inspect to native UIView/NSView, which we use to test `ActivityIndicator` and `ProgressIndicator`.
646
+
+[ViewInspector](https://github.com/nalexn/ViewInspector): Inspect View's runtime attribute value (like `.frame` modifier, `.image` value). We use this to test `AnimatedImage` and `WebImage`. It also allows the inspect to native UIView/NSView.
0 commit comments