@alexanderwodarz/capacitor-ios-inapppurchase
v0.0.7
Published
Allows Capacitor Vue Apps to add in app purchases for iOS
Downloads
12
Maintainers
Readme
@alexanderwodarz/capacitor-ios-inapppurchase
Allows Capacitor Vue Apps to add in app purchases for iOS
Install
npm install @alexanderwodarz/capacitor-ios-inapppurchase
npx cap sync
Preparations
- After installation open Xcode
- Click on Project Navigator > App
- Create a new "StoreKit Configuration File" file with name "Product"
- Create a new "Property List" file with name "PropertyList"
- Make sure that both files are directly in "App" located and not in any other directory
- Click in Project Navigator on Product and configure your products
- Click on PropertyList and map your Reference Name with your id
- Press CMD + Shift + , to open "scheme edit"
- Select left Run and Options
- Select "Product.storekit" in "StoreKit Configuration"
Notes
Currently just tested with "Non-Consumable In-App Purchase"
API
list(...)
list(options: { list: [registerProduct]; }) => Promise<{ value: boolean; }>
| Param | Type |
| ------------- | ----------------------------------------- |
| options
| { list: [registerProduct]; } |
Returns: Promise<{ value: boolean; }>
getStoreProducts()
getStoreProducts() => Promise<any>
Returns: Promise<any>
getPurchasedItems()
getPurchasedItems() => Promise<any>
Returns: Promise<any>
getProduct(...)
getProduct(options: { id: string; }) => Promise<{ value: string; }>
| Param | Type |
| ------------- | ---------------------------- |
| options
| { id: string; } |
Returns: Promise<{ value: string; }>
purchase(...)
purchase(options: { id: string; }) => Promise<{ value: boolean; }>
| Param | Type |
| ------------- | ---------------------------- |
| options
| { id: string; } |
Returns: Promise<{ value: boolean; }>
Interfaces
registerProduct
| Prop | Type |
| --------------- | ------------------- |
| reference
| string |
| id
| string |