feat: add IAP in native bridge plugin for iOS (#1673)

This commit is contained in:
Huang Xin 2025-07-24 20:54:17 +08:00 committed by GitHub
parent beaf034035
commit f3e9983742
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
16 changed files with 718 additions and 2 deletions

View file

@ -0,0 +1,13 @@
# Automatically generated - DO NOT EDIT!
"$schema" = "../../schemas/schema.json"
[[permission]]
identifier = "allow-iap-fetch-products"
description = "Enables the iap_fetch_products command without any pre-configured scope."
commands.allow = ["iap_fetch_products"]
[[permission]]
identifier = "deny-iap-fetch-products"
description = "Denies the iap_fetch_products command without any pre-configured scope."
commands.deny = ["iap_fetch_products"]

View file

@ -0,0 +1,13 @@
# Automatically generated - DO NOT EDIT!
"$schema" = "../../schemas/schema.json"
[[permission]]
identifier = "allow-iap-initialize"
description = "Enables the iap_initialize command without any pre-configured scope."
commands.allow = ["iap_initialize"]
[[permission]]
identifier = "deny-iap-initialize"
description = "Denies the iap_initialize command without any pre-configured scope."
commands.deny = ["iap_initialize"]

View file

@ -0,0 +1,13 @@
# Automatically generated - DO NOT EDIT!
"$schema" = "../../schemas/schema.json"
[[permission]]
identifier = "allow-iap-purchase-product"
description = "Enables the iap_purchase_product command without any pre-configured scope."
commands.allow = ["iap_purchase_product"]
[[permission]]
identifier = "deny-iap-purchase-product"
description = "Denies the iap_purchase_product command without any pre-configured scope."
commands.deny = ["iap_purchase_product"]

View file

@ -0,0 +1,13 @@
# Automatically generated - DO NOT EDIT!
"$schema" = "../../schemas/schema.json"
[[permission]]
identifier = "allow-iap-restore-purchases"
description = "Enables the iap_restore_purchases command without any pre-configured scope."
commands.allow = ["iap_restore_purchases"]
[[permission]]
identifier = "deny-iap-restore-purchases"
description = "Denies the iap_restore_purchases command without any pre-configured scope."
commands.deny = ["iap_restore_purchases"]

View file

@ -14,6 +14,10 @@ Default permissions for the plugin
- `allow-get-sys-fonts-list`
- `allow-intercept-keys`
- `allow-lock-screen-orientation`
- `allow-iap-initialize`
- `allow-iap-fetch-products`
- `allow-iap-purchase-product`
- `allow-iap-restore-purchases`
## Permission Table
@ -157,6 +161,110 @@ Denies the get_sys_fonts_list command without any pre-configured scope.
<tr>
<td>
`native-bridge:allow-iap-fetch-products`
</td>
<td>
Enables the iap_fetch_products command without any pre-configured scope.
</td>
</tr>
<tr>
<td>
`native-bridge:deny-iap-fetch-products`
</td>
<td>
Denies the iap_fetch_products command without any pre-configured scope.
</td>
</tr>
<tr>
<td>
`native-bridge:allow-iap-initialize`
</td>
<td>
Enables the iap_initialize command without any pre-configured scope.
</td>
</tr>
<tr>
<td>
`native-bridge:deny-iap-initialize`
</td>
<td>
Denies the iap_initialize command without any pre-configured scope.
</td>
</tr>
<tr>
<td>
`native-bridge:allow-iap-purchase-product`
</td>
<td>
Enables the iap_purchase_product command without any pre-configured scope.
</td>
</tr>
<tr>
<td>
`native-bridge:deny-iap-purchase-product`
</td>
<td>
Denies the iap_purchase_product command without any pre-configured scope.
</td>
</tr>
<tr>
<td>
`native-bridge:allow-iap-restore-purchases`
</td>
<td>
Enables the iap_restore_purchases command without any pre-configured scope.
</td>
</tr>
<tr>
<td>
`native-bridge:deny-iap-restore-purchases`
</td>
<td>
Denies the iap_restore_purchases command without any pre-configured scope.
</td>
</tr>
<tr>
<td>
`native-bridge:allow-install-package`
</td>

View file

@ -11,4 +11,8 @@ permissions = [
"allow-get-sys-fonts-list",
"allow-intercept-keys",
"allow-lock-screen-orientation",
"allow-iap-initialize",
"allow-iap-fetch-products",
"allow-iap-purchase-product",
"allow-iap-restore-purchases",
]

View file

@ -354,6 +354,54 @@
"const": "deny-get-sys-fonts-list",
"markdownDescription": "Denies the get_sys_fonts_list command without any pre-configured scope."
},
{
"description": "Enables the iap_fetch_products command without any pre-configured scope.",
"type": "string",
"const": "allow-iap-fetch-products",
"markdownDescription": "Enables the iap_fetch_products command without any pre-configured scope."
},
{
"description": "Denies the iap_fetch_products command without any pre-configured scope.",
"type": "string",
"const": "deny-iap-fetch-products",
"markdownDescription": "Denies the iap_fetch_products command without any pre-configured scope."
},
{
"description": "Enables the iap_initialize command without any pre-configured scope.",
"type": "string",
"const": "allow-iap-initialize",
"markdownDescription": "Enables the iap_initialize command without any pre-configured scope."
},
{
"description": "Denies the iap_initialize command without any pre-configured scope.",
"type": "string",
"const": "deny-iap-initialize",
"markdownDescription": "Denies the iap_initialize command without any pre-configured scope."
},
{
"description": "Enables the iap_purchase_product command without any pre-configured scope.",
"type": "string",
"const": "allow-iap-purchase-product",
"markdownDescription": "Enables the iap_purchase_product command without any pre-configured scope."
},
{
"description": "Denies the iap_purchase_product command without any pre-configured scope.",
"type": "string",
"const": "deny-iap-purchase-product",
"markdownDescription": "Denies the iap_purchase_product command without any pre-configured scope."
},
{
"description": "Enables the iap_restore_purchases command without any pre-configured scope.",
"type": "string",
"const": "allow-iap-restore-purchases",
"markdownDescription": "Enables the iap_restore_purchases command without any pre-configured scope."
},
{
"description": "Denies the iap_restore_purchases command without any pre-configured scope.",
"type": "string",
"const": "deny-iap-restore-purchases",
"markdownDescription": "Denies the iap_restore_purchases command without any pre-configured scope."
},
{
"description": "Enables the install_package command without any pre-configured scope.",
"type": "string",
@ -415,10 +463,10 @@
"markdownDescription": "Denies the use_background_audio command without any pre-configured scope."
},
{
"description": "Default permissions for the plugin\n#### This default permission set includes:\n\n- `allow-auth-with-safari`\n- `allow-auth-with-custom-tab`\n- `allow-copy-uri-to-path`\n- `allow-use-background-audio`\n- `allow-install-package`\n- `allow-set-system-ui-visibility`\n- `allow-get-status-bar-height`\n- `allow-get-sys-fonts-list`\n- `allow-intercept-keys`\n- `allow-lock-screen-orientation`",
"description": "Default permissions for the plugin\n#### This default permission set includes:\n\n- `allow-auth-with-safari`\n- `allow-auth-with-custom-tab`\n- `allow-copy-uri-to-path`\n- `allow-use-background-audio`\n- `allow-install-package`\n- `allow-set-system-ui-visibility`\n- `allow-get-status-bar-height`\n- `allow-get-sys-fonts-list`\n- `allow-intercept-keys`\n- `allow-lock-screen-orientation`\n- `allow-iap-initialize`\n- `allow-iap-fetch-products`\n- `allow-iap-purchase-product`\n- `allow-iap-restore-purchases`",
"type": "string",
"const": "default",
"markdownDescription": "Default permissions for the plugin\n#### This default permission set includes:\n\n- `allow-auth-with-safari`\n- `allow-auth-with-custom-tab`\n- `allow-copy-uri-to-path`\n- `allow-use-background-audio`\n- `allow-install-package`\n- `allow-set-system-ui-visibility`\n- `allow-get-status-bar-height`\n- `allow-get-sys-fonts-list`\n- `allow-intercept-keys`\n- `allow-lock-screen-orientation`"
"markdownDescription": "Default permissions for the plugin\n#### This default permission set includes:\n\n- `allow-auth-with-safari`\n- `allow-auth-with-custom-tab`\n- `allow-copy-uri-to-path`\n- `allow-use-background-audio`\n- `allow-install-package`\n- `allow-set-system-ui-visibility`\n- `allow-get-status-bar-height`\n- `allow-get-sys-fonts-list`\n- `allow-intercept-keys`\n- `allow-lock-screen-orientation`\n- `allow-iap-initialize`\n- `allow-iap-fetch-products`\n- `allow-iap-purchase-product`\n- `allow-iap-restore-purchases`"
}
]
}