{"id":32143255,"url":"https://github.com/aydenp/passencoder","last_synced_at":"2025-10-21T07:55:37.173Z","repository":{"id":47049571,"uuid":"132376991","full_name":"aydenp/PassEncoder","owner":"aydenp","description":"Simple PassKit (Apple Wallet) encoding and signing in Swift.","archived":false,"fork":false,"pushed_at":"2023-06-05T12:51:59.000Z","size":236,"stargazers_count":48,"open_issues_count":6,"forks_count":14,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-10-05T15:46:54.104Z","etag":null,"topics":["apple-wallet","passbook","passkit","server-side-swift","swift","swift-linux","swift-package","wallet"],"latest_commit_sha":null,"homepage":"https://aydenp.github.io/PassEncoder/","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aydenp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-05-06T21:20:50.000Z","updated_at":"2025-09-12T05:41:11.000Z","dependencies_parsed_at":"2022-08-30T05:50:24.767Z","dependency_job_id":null,"html_url":"https://github.com/aydenp/PassEncoder","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/aydenp/PassEncoder","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aydenp%2FPassEncoder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aydenp%2FPassEncoder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aydenp%2FPassEncoder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aydenp%2FPassEncoder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aydenp","download_url":"https://codeload.github.com/aydenp/PassEncoder/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aydenp%2FPassEncoder/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280225807,"owners_count":26293888,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-21T02:00:06.614Z","response_time":58,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["apple-wallet","passbook","passkit","server-side-swift","swift","swift-linux","swift-package","wallet"],"created_at":"2025-10-21T07:55:35.794Z","updated_at":"2025-10-21T07:55:37.168Z","avatar_url":"https://github.com/aydenp.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PassEncoder\n\nApple Wallet (formerly Passbook) pass encoding and signing in Swift.\n\n## Features\n\n- Modern Swift API\n- Allows you to specify custom pass data\n- Add other files (images, JSON, etc)\n- Manifest generation\n- Signing support\n- File system managed seamlessly\n- Get pass `Data` easily\n\n## Requirements\n\n- macOS 10.12+ or Linux (with zlib development package)\n- Xcode 9.0+\n- Swift 5.2+\n- OpenSSL\n\n## Installation\n\n### Swift Package Manager\n\nAdd the following line to your dependencies section of `Package.swift`:\n\n    .package(url: \"https://github.com/aydenp/PassEncoder.git\", .upToNextMajor(from: \"1.0.0\"))\n\nand add \"PassEncoder\" to your target's dependencies.\n\n## Usage\n\n    // Create our encoder\n    if let encoder = PassEncoder(passDataURL: directory.appendingPathComponent(\"pass.json\")) {\n        // Add a nice icon\n        encoder.addFile(from: directory.appendingPathComponent(\"icon.png\"))\n        let passData = encoder.encode(signingInfo: (certificate: URL_TO_CERT.PEM, password: CERT_PASSWORD))\n        // Your archived .pkpass file is in passData as Data\n    }\n    \nBefore using the library, you'll also need to set the Apple WWDR certificate URL, which you can [read about below](#creating-and-preparing-your-certificate).\n    \n\u003e **Heads up!** Operations in this library are all synchronous, so it is advisable to run them on a separate `OperationQueue` so that they do not block your thread.\n\n### Creating and preparing your certificate\n\nYou need to repeat this step for each different `passTypeId` you have in your `pass.json`.\n\n1. Go to the [Apple Developer Pass Type IDs page](https://developer.apple.com/account/ios/identifier/passTypeId) and create your pass type.\n2. Go to the [certificate section](https://developer.apple.com/account/ios/certificate/) and follow the instructions to create a certificate for your pass.\n3. Download the certificate, and ensure it is named `Certificates.p12`.\n4. Run the following command: `openssl pkcs12 -in Certificates.p12 -out PassCert.pem`.\n5. Your pass certificate is now stored in `PassCert.pem`!\n\nYou'll also need to download the Apple Worldwide Developer Relations Intermediate Certificate - G4 file to sign passes.\n\n1. Download the [intermediate certificate from here](https://www.apple.com/certificateauthority/AppleWWDRCAG4.cer).\n2. Import it into Keychain Access (double click it).\n3. Find it in Keychain Access, and export it as a .pem file.\n4. Set the `PassSigner`'s WWDR URL to it in your code.\n\n        PassSigner.shared.appleWWDRCertURL = URL(fileURLWithPath: PATH_TO_WWDR_CERT.PEM)\n\n## Documentation\n\nTo take full advantage of the package, check out the [documentation](https://aydenp.github.io/PassEncoder/) and see all of the methods and variables that are made available to you.\n\n## Contributing\n\nFeel free to contribute to the source code of PassEncoder to make it something even better! Just try to adhere to the general coding style throughout, to make it as readable as possible.\n\nIf you find an issue in the code or while using it, [create an issue](/issues/new). If you can, you're encouraged to contribute and make a [pull request](/pulls).\n\n## License\n\nThis project is licensed under the [MIT license](/LICENSE). Please make sure you comply with its terms while using it in any way.\n\n## Links\n\n- [My website](https://ayden.dev)\n- [GitHub](https://www.github.com/aydenp/PassEncoder)\n- [Documentation](https://aydenp.github.io/PassEncoder/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faydenp%2Fpassencoder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faydenp%2Fpassencoder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faydenp%2Fpassencoder/lists"}