pkpass

Crates.iopkpass
lib.rspkpass
version1.1.0
created_at2025-07-23 08:28:43.882407+00
updated_at2025-08-01 11:13:35.880349+00
descriptionRust library for generate Apple Wallet Passes for iOS, WatchOS, MacOS.
homepage
repositoryhttps://github.com/Q1-Energie-AG/pkpass
max_upload_size
id1764491
size164,438
Kevin (moogle19)

documentation

https://docs.rs/pkpass/latest/pkpass/

README

PKPass (Fork of passes-rs)

A Rust library for generating PassKit passes, featuring:

  • Read & parse .pkpass files
  • Build & make passes by using library API
  • Sign passes with certificate and compress to .pkpass
  • Change field values is pass by key name
  • Supported semantic tags for pass & fields
  • All features of Wallet Passes standard represented in library

Documentation:

Usage

Add this to your Cargo.toml:

[dependencies]
pkpass = "0.1.0"

Example

For building simple pass:

// Creating pass
let pass = PassBuilder::new(PassConfig {
    organization_name: "Test organization".into(),
    description: "Super gentlememe pass".into(),
    pass_type_identifier: "com.example.pass".into(),
    team_identifier: "AA00AA0A0A".into(),
    serial_number: "ABCDEFG1234567890".into(),
})
.grouping_identifier(String::from("com.example.pass.app"))
.logo_text("Test pass".into())
.build();

Creating package and generate .pkpass file:

let mut package = Package::new(pass);

// Save package as .pkpass
let path = Path::new("test_pass.pkpass");
let file = match File::create(&path) {
    Err(why) => panic!("couldn't create {}: {}", path.display(), why),
    Ok(file) => file,
};
package.write(file).unwrap();

For more examples, see examples directory.

License

Passes is distributed under the terms of the MIT license. See LICENSE.

Commit count: 0

cargo fmt