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
+60-1Lines changed: 60 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -213,7 +213,7 @@ For more information, it's really recommended to check our demo, to learn detail
213
213
214
214
### Common Problems
215
215
216
-
+ Using Image/WebImage/AnimatedImage in Button/NavigationLink
216
+
####Using Image/WebImage/AnimatedImage in Button/NavigationLink
217
217
218
218
SwiftUI's `Button` apply overlay to its content (except `Text`) by default, this is common mistake to write code like this, which cause strange behavior:
219
219
@@ -251,6 +251,65 @@ NavigationView {
251
251
}
252
252
```
253
253
254
+
#### Use for backward deployment and weak linking SwiftUI
255
+
256
+
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.
257
+
258
+
To use backward deployment, you have to do the follow things:
259
+
260
+
+ Add `-weak_framework SwiftUI -weak_framework Combine` in your App Target's `Other Linker Flags` build setting
261
+
262
+
You should notice that all the third party SwiftUI framework should have this build setting as well, not only just ourself (we already added). Or when running on iOS 12 device, it will trigger the runtime dyld error on startup.
263
+
264
+
+ Use CocoaPods or Carthage (SwiftPM does not support weak linking nor backward deployment currently)
265
+
266
+
For Carthage user, the built binary framework will use [Library Evolution](https://swift.org/blog/abi-stability-and-more/) to support for backward deployment.
267
+
268
+
For CocoaPods user, you should skip the platform validation in Podfile with
269
+
270
+
```ruby
271
+
platform :ios, '13.0'# This does not effect your App Target's deployment target version, just a hint for CocoaPods
272
+
```
273
+
274
+
+ Add **all the SwiftUI code** with the available annotation and runtime check, like this:
0 commit comments