From 4cf503673f344736c3a9b120820857131b4a5c8c Mon Sep 17 00:00:00 2001 From: Kyle Date: Sun, 3 Aug 2025 17:54:48 +0800 Subject: [PATCH] Add usage part in README --- README.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/README.md b/README.md index e602a902..c97285aa 100644 --- a/README.md +++ b/README.md @@ -25,6 +25,26 @@ The project is for the following purposes: Currently, this project is in early development. +## Usage + +### Via Swift Package Manager + +Add OpenGraph as a dependency in your `Package.swift`: + +```swift +dependencies: [ + .package(url: "https://github.com/OpenSwiftUIProject/OpenGraph.git", from: "0.2.0") +] +``` + +> [!NOTE] +> - You may need to configure the Swift toolchain header for proper integration of OpenGraph +> - By default, OpenGraphShims will use the private AttributeGraph as its implementation on Apple platforms + +### Via Prebuilt XCFramework + +For a simpler setup, you can use the prebuilt XCFramework available on the [releases page](https://github.com/OpenSwiftUIProject/OpenGraph/releases). + ## Build The current suggested toolchain to build the project is Swift 6.1.2 / Xcode 16.4.