Skip to content

Commit 2e76fb5

Browse files
committed
Add the readme about backward deployment
1 parent dd3aa49 commit 2e76fb5

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

README.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,32 @@ Note: By default, if the image is cached, we do not send request to query new me
128128
129129
Note: By default, we prefer to load the image only, which does not generate the image data. This can increase the loading speed. But however, you can also specify to generate the image data by using `SDWebImageContextLinkRequestImageData` context option.
130130
131+
### Backward Deployment
132+
133+
This framework supports backward deployment on iOS 12-/macOS 10.14- version from v0.3.0. The backward deployment supports Carthage/CocoaPods only (SwiftPM does not support).
134+
135+
For CocoaPods user, you can skip the platform version validation in Podfile with:
136+
137+
```ruby
138+
platform :ios, '13.0' # This does not effect your App Target's deployment target version, just a hint for CocoaPods
139+
```
140+
141+
For Carthage user, the built binary framework use weak linking for backward deployment.
142+
143+
Pay attention, you should always use the runtime version check to ensure those symbols are available, you should mark all the classes use public API with `API_AVAILABLE` annotation as well. See below:
144+
145+
```objective-c
146+
if (@available(iOS 13, *)) {
147+
SDImageLinkLoader.sharedLoader.timeout = 60;
148+
}
149+
150+
API_AVAILABLE(ios(13.0))
151+
@interface MyLinkManager : NSObject
152+
@property (nonatomic) LPLinkMetadata *metadata;
153+
@property (nonatomic) SDImageLinkLoader *loader;
154+
@end
155+
```
156+
131157
## Demo
132158
133159
If you have some issue about usage, SDWebImageLinkPlugin provide a demo for iOS && macOS platform. To run the demo, clone the repo and run the following command.

0 commit comments

Comments
 (0)