Skip to content

Commit 905072a

Browse files
committed
Update the README about canonical binary XCFramework
1 parent 3d7b003 commit 905072a

File tree

1 file changed

+31
-1
lines changed

1 file changed

+31
-1
lines changed

README.md

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,10 +207,11 @@ In order to clean up things and make our core project do less things, we decided
207207

208208
## Installation
209209

210-
There are four ways to use SDWebImage in your project:
210+
There are 5 ways to use SDWebImage in your project:
211211
- using CocoaPods
212212
- using Carthage
213213
- using Swift Package Manager
214+
- download binary XCFramework
214215
- manual install (build frameworks or embed Xcode Project)
215216

216217
### Installation with CocoaPods
@@ -270,6 +271,12 @@ If this is your first time using Carthage in the project, you'll need to go thro
270271

271272
> NOTE: At this time, Carthage does not provide a way to build only specific repository subcomponents (or equivalent of CocoaPods's subspecs). All components and their dependencies will be built with the above command. However, you don't need to copy frameworks you aren't using into your project. For instance, if you aren't using `SDWebImageMapKit`, feel free to delete that framework from the Carthage Build directory after `carthage update` completes.
272273
274+
> NOTE: [Apple requires SDWebImage contains signatures](https://developer.apple.com/support/third-party-SDK-requirements/). So, by default the `carthage build` binary framework does not do codesign, this will cause validation error. You can sign yourself with the Apple Developer Program identity, or using the binary framework:
275+
276+
```
277+
binary "https://github.com/SDWebImage/SDWebImage/raw/master/SDWebImage.json"
278+
```
279+
273280
### Installation with Swift Package Manager (Xcode 11+)
274281

275282
[Swift Package Manager](https://swift.org/package-manager/) (SwiftPM) is a tool for managing the distribution of Swift code as well as C-family dependency. From Xcode 11, SwiftPM got natively integrated with Xcode.
@@ -290,6 +297,29 @@ let package = Package(
290297
)
291298
```
292299

300+
### Download binary XCFramework
301+
302+
From 5.19.2, SDWebImage provide the canonical official binary XCFramework on [GitHub release pages](https://github.com/SDWebImage/SDWebImage/releases).
303+
304+
+ Download XCFramework
305+
306+
You can choose to download `SDWebImage-dynamic.xcframework.zip` for dynamic linked one, or `SDWebImage-static.xcframework.zip` for static-linked one.
307+
308+
+ Integrate to Xcode Project
309+
310+
Drag the unzipped `.xcframework` into your Xcode Project's Framework tab.
311+
312+
+ Verify signature of binary XCFramework
313+
314+
From Xcode 15 Apple will verify the signature of binary XCFramework, to avoid supply chain attack.
315+
316+
The certifacate is stored in the repo [here](https://github.com/SDWebImage/SDWebImage/blob/master/Certificate/SDWebImage%20Signing%20Certificate.cer)
317+
318+
The public key is stored in the repo [here](https://github.com/SDWebImage/SDWebImage/blob/master/Certificate/SDWebImage%20Signing%20Certificate.pem)
319+
320+
See more: [Verifying the origin of your XCFrameworks](https://developer.apple.com/documentation/Xcode/verifying-the-origin-of-your-xcframeworks)
321+
322+
293323
### Manual Installation Guide
294324

295325
+ Check your command line Xcode version

0 commit comments

Comments
 (0)