mirror of
https://github.com/readest/readest.git
synced 2026-04-29 12:00:49 +00:00
feat: add IAP in native bridge plugin for iOS (#1673)
This commit is contained in:
parent
beaf034035
commit
f3e9983742
16 changed files with 718 additions and 2 deletions
|
|
@ -81,3 +81,34 @@ pub(crate) async fn lock_screen_orientation<R: Runtime>(
|
|||
) -> Result<()> {
|
||||
app.native_bridge().lock_screen_orientation(payload)
|
||||
}
|
||||
|
||||
#[command]
|
||||
pub(crate) async fn iap_initialize<R: Runtime>(
|
||||
app: AppHandle<R>,
|
||||
payload: IAPInitializeRequest,
|
||||
) -> Result<IAPInitializeResponse> {
|
||||
app.native_bridge().iap_initialize(payload)
|
||||
}
|
||||
|
||||
#[command]
|
||||
pub(crate) async fn iap_fetch_products<R: Runtime>(
|
||||
app: AppHandle<R>,
|
||||
payload: IAPFetchProductsRequest,
|
||||
) -> Result<IAPFetchProductsResponse> {
|
||||
app.native_bridge().iap_fetch_products(payload)
|
||||
}
|
||||
|
||||
#[command]
|
||||
pub(crate) async fn iap_purchase_product<R: Runtime>(
|
||||
app: AppHandle<R>,
|
||||
payload: IAPPurchaseProductRequest,
|
||||
) -> Result<IAPPurchaseProductResponse> {
|
||||
app.native_bridge().iap_purchase_product(payload)
|
||||
}
|
||||
|
||||
#[command]
|
||||
pub(crate) async fn iap_restore_purchases<R: Runtime>(
|
||||
app: AppHandle<R>,
|
||||
) -> Result<IAPRestorePurchasesResponse> {
|
||||
app.native_bridge().iap_restore_purchases()
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue