Skip to content

Provides access to iOS native StoreKit2 Swift API from inside Bevy Apps

Notifications You must be signed in to change notification settings

BraymatterOrg/bevy_ios_iap

 
 

Repository files navigation

bevy_ios_iap

crates.io docs.rs

Provides access to iOS native StoreKit2 Swift API from inside Bevy Apps. It uses Swift-Bridge to auto-generate the glue code and transport datatypes.

demo

See also bevy_ios_notifications, bevy_ios_alerts & bevy_ios_impact

Features

  • fetch detailed products
  • purchase
  • listen to changes in previous transactions
  • fetch list of all transactions (to restore old purchases of non-consumables)

Notes

  • does not return locally un-signed/un-verified transactions

Todo

  • forward transaction.id inside of successful purchase result to allow early finish
  • support subscription product type
  • remaining error handling in: ios_iap_transactions_all and ios_iap_products
  • allow access to signature for remote verification
  • support offers
  • support family sharing
  • transaction revocation reason

Swift-Bridge wishlist

  • how to return data from swift that rust can read? (fn foo() -> Bar)
  • make @_cdecl funcs public (chinedufn/swift-bridge#166)
  • allow changing stuff to allow multiple libs using this approach (SwiftBridgeCore.swift, Name of RustXcframework, Headers subfolder etc.) see https://github.com/jessegrosjean/swift-cargo-problem
  • support derives(Clone,Debug) on shared enums
  • support calling async swift from rust
  • allow shared structs in Vec's (Vectorizable)
  • properly add missing import RustXcframework when using Swift Package approach
  • add swift_bridge_build.update_package to only copy the files over instead of generating everything (and do the above)
  • how to get swift Data out? cannot figure out how to convert that into RustVec or anything compatible

About

Provides access to iOS native StoreKit2 Swift API from inside Bevy Apps

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Swift 59.1%
  • C 27.8%
  • Rust 10.6%
  • Makefile 1.8%
  • Shell 0.7%