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: Example/SDWebImageSwiftUI.xcodeproj/xcshareddata/xcschemes/SDWebImageSwiftUIDemo-watchOS WatchKit App.xcscheme
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
@@ -51,10 +51,10 @@ All issue reports, feature requests, contributions, and GitHub stars are welcome
51
51
## Requirements
52
52
53
53
+ Xcode 12+
54
-
+ iOS 13+ (14+ Recommended)
55
-
+ macOS 10.15+ (11+ Recommended)
56
-
+ tvOS 13+ (14+ Recommended)
57
-
+ watchOS 6+ (7+ Recommended)
54
+
+ iOS 14+
55
+
+ macOS 11+
56
+
+ tvOS 14+
57
+
+ watchOS 7+
58
58
59
59
## SwiftUI 2.0 Compatibility
60
60
@@ -74,9 +74,7 @@ var body: some View {
74
74
}
75
75
```
76
76
77
-
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.
78
-
79
-
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.
77
+
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.
80
78
81
79
82
80
## Installation
@@ -166,7 +164,14 @@ var body: some View {
166
164
}
167
165
```
168
166
169
-
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).
167
+
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:
168
+
169
+
```swift
170
+
WebImage(url: url)
171
+
.indicator(.activity)
172
+
```
173
+
174
+
or you can just write like:
170
175
171
176
```swift
172
177
WebImage(url: url)
@@ -514,7 +519,7 @@ For caches, you actually don't need to worry about anything. It just works after
514
519
515
520
#### Using for backward deployment and weak linking SwiftUI
516
521
517
-
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.
522
+
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.
518
523
519
524
To use backward deployment, you have to do the follow things:
520
525
@@ -528,7 +533,7 @@ You should notice that all the third party SwiftUI frameworks should have this b
528
533
529
534
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.
530
535
531
-
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.
536
+
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.
532
537
533
538
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`).
534
539
@@ -555,7 +560,7 @@ end
555
560
+ For CocoaPods user, you can skip the platform version validation in Podfile with:
556
561
557
562
```ruby
558
-
platform :ios, '13.0'# This does not effect your App Target's deployment target version, just a hint for CocoaPods
563
+
platform :ios, '14.0'# This does not effect your App Target's deployment target version, just a hint for CocoaPods
559
564
```
560
565
561
566
+ 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.
@@ -568,7 +573,7 @@ Add **all the SwiftUI code** with the available annotation and runtime check, li
@@ -630,7 +635,7 @@ SDWebImageSwiftUI has Unit Test to increase code quality. For SwiftUI, there are
630
635
631
636
However, since SwiftUI is State-Based and Attributed-Implemented layout system, there are open source projects who provide the solution:
632
637
633
-
+[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`.
638
+
+[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