storekit-rs 0.4.2

Safe Rust bindings for Apple's StoreKit framework — in-app purchases and transaction streams on macOS
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use std::time::Duration;

use storekit::Storefront;

fn main() -> Result<(), Box<dyn std::error::Error>> {
    println!("current storefront: {:?}", Storefront::current());
    match Storefront::updates() {
        Ok(mut updates) => println!(
            "storefront update within timeout: {:?}",
            updates.next_timeout(Duration::from_millis(100))?
        ),
        Err(error) => println!("storefront updates unavailable: {error}"),
    }
    Ok(())
}