diff --git a/README.md b/README.md index 404410c..8673607 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@
-🎟️ A Vapor package which handles all the server side elements required to implement passes for Apple Wallet. +🎟️ 📦 A Vapor package which handles all the server side elements required to implement Apple Wallet passes and orders. ### Major Releases @@ -36,16 +36,16 @@ Use the SPM string to easily include the dependendency in your `Package.swift` f .package(url: "https://github.com/vapor-community/PassKit.git", from: "0.4.0") ``` -and add it to your target's dependencies: +> Note: This package is made for Vapor 4. + +## 🎟️ Wallet Passes + +Add the `Passes` product to your target's dependencies: ```swift .product(name: "Passes", package: "PassKit") ``` -> Note: This package is made for Vapor 4. - -## Usage - ### Implement your pass data model Your data model should contain all the fields that you store for your pass, as well as a foreign key for the pass itself. @@ -128,6 +128,9 @@ FOR EACH ROW EXECUTE PROCEDURE "public"."RemoveUnregisteredItems"(); ``` +> [!CAUTION] +> Be careful with SQL triggers, as they can have unintended consequences if not properly implemented. + ### Model the `pass.json` contents Create a `struct` that implements `PassJSON` which will contain all the fields for the generated `pass.json` file. @@ -434,3 +437,15 @@ fileprivate func passHandler(_ req: Request) async throws -> Response { return Response(status: .ok, headers: headers, body: body) } ``` + +## 📦 Wallet Orders + +Add the `Orders` product to your target's dependencies: + +```swift +.product(name: "Orders", package: "PassKit") +``` + +> [!WARNING] +> The `Orders` is WIP, right now you can only set up the models and generate `.order` bundles. +APNS support and order updates will be added soon. See the `Orders` target's documentation. \ No newline at end of file