Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion QonversionCapacitorPlugin.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ Pod::Spec.new do |s|
s.ios.deployment_target = '14.0'
s.dependency 'Capacitor'
s.swift_version = '5.1'
s.dependency "QonversionSandwich", "7.10.1"
s.dependency "QonversionSandwich", "7.11.0"
end
2 changes: 1 addition & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ dependencies {
implementation project(':capacitor-android')
implementation "androidx.appcompat:appcompat:$androidxAppCompatVersion"
implementation 'androidx.core:core-ktx:1.13.1'
implementation "io.qonversion:sandwich:7.10.1"
implementation "io.qonversion:sandwich:7.11.0"
testImplementation "junit:junit:$junitVersion"
androidTestImplementation "androidx.test.ext:junit:$androidxJunitVersion"
androidTestImplementation "androidx.test.espresso:espresso-core:$androidxEspressoCoreVersion"
Expand Down
15 changes: 1 addition & 14 deletions example/src/app/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import { showToast, setLoading } from './utils';
import { renderMainScreen } from './screens/MainScreen';
import { renderProductsScreen } from './screens/ProductsScreen';
import { renderEntitlementsScreen } from './screens/EntitlementsScreen';
import { renderOfferingsScreen } from './screens/OfferingsScreen';
import { renderRemoteConfigsScreen } from './screens/RemoteConfigsScreen';
import { renderUserScreen } from './screens/UserScreen';
import { renderNoCodesScreen } from './screens/NoCodesScreen';
Expand All @@ -23,7 +22,6 @@ const screenRenderers: Record<string, () => string> = {
main: renderMainScreen,
products: renderProductsScreen,
entitlements: renderEntitlementsScreen,
offerings: renderOfferingsScreen,
remoteConfigs: renderRemoteConfigsScreen,
user: renderUserScreen,
noCodes: renderNoCodesScreen,
Expand All @@ -36,7 +34,6 @@ const screenTitles: Record<string, string> = {
main: 'Qonversion SDK Demo',
products: 'Products',
entitlements: 'Entitlements',
offerings: 'Offerings',
remoteConfigs: 'Remote Configs',
user: 'User',
noCodes: 'No-Codes',
Expand All @@ -49,13 +46,6 @@ function renderMoreScreen(): string {
<div class="section">
<h2 class="section-title">Additional Features</h2>
<div class="list">
<div class="list-item" data-navigate="offerings">
<div class="list-item-content">
<div class="list-item-title">📋 Offerings</div>
<div class="list-item-subtitle">View available offerings and products</div>
</div>
<span class="list-item-arrow">›</span>
</div>
<div class="list-item" data-navigate="remoteConfigs">
<div class="list-item-content">
<div class="list-item-title">⚙️ Remote Configs</div>
Expand Down Expand Up @@ -196,7 +186,7 @@ function updateNavigation(): void {
navItems.forEach(item => {
const screen = item.getAttribute('data-screen');
item.classList.toggle('active', screen === currentScreen ||
(screen === 'more' && ['offerings', 'remoteConfigs', 'noCodes', 'other'].includes(currentScreen)));
(screen === 'more' && ['remoteConfigs', 'noCodes', 'other'].includes(currentScreen)));
});

// Update header
Expand Down Expand Up @@ -241,9 +231,6 @@ function setupScreenEventListeners(screen: string): void {
case 'entitlements':
import('./screens/EntitlementsScreen').then(m => m.setupEntitlementsScreenEvents?.());
break;
case 'offerings':
import('./screens/OfferingsScreen').then(m => m.setupOfferingsScreenEvents?.());
break;
case 'remoteConfigs':
import('./screens/RemoteConfigsScreen').then(m => m.setupRemoteConfigsScreenEvents?.());
break;
Expand Down
4 changes: 0 additions & 4 deletions example/src/app/screens/MainScreen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,6 @@ export function renderMainScreen(): string {
<span class="menu-item-icon">🎫</span>
<span class="menu-item-title">Entitlements</span>
</div>
<div class="menu-item" data-navigate="offerings">
<span class="menu-item-icon">📋</span>
<span class="menu-item-title">Offerings</span>
</div>
<div class="menu-item" data-navigate="remoteConfigs">
<span class="menu-item-icon">⚙️</span>
<span class="menu-item-title">Remote Configs</span>
Expand Down
207 changes: 0 additions & 207 deletions example/src/app/screens/OfferingsScreen.ts

This file was deleted.

10 changes: 2 additions & 8 deletions example/src/app/store.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Product, Offerings, Entitlement, RemoteConfigList, User } from '@qonversion/capacitor-plugin';
import type { Product, Entitlement, RemoteConfigList, User } from '@qonversion/capacitor-plugin';

export interface AppState {
currentScreen: string;
Expand All @@ -11,7 +11,6 @@ export interface AppState {
// Data
userInfo: User | null;
products: Map<string, Product> | null;
offerings: Offerings | null;
entitlements: Map<string, Entitlement> | null;
remoteConfigs: RemoteConfigList | null;

Expand All @@ -32,7 +31,6 @@ export type AppAction =
| { type: 'SET_NOCODES_INITIALIZED'; payload: boolean }
| { type: 'SET_USER_INFO'; payload: User | null }
| { type: 'SET_PRODUCTS'; payload: Map<string, Product> }
| { type: 'SET_OFFERINGS'; payload: Offerings }
| { type: 'SET_ENTITLEMENTS'; payload: Map<string, Entitlement> }
| { type: 'SET_REMOTE_CONFIGS'; payload: RemoteConfigList }
| { type: 'ADD_NOCODES_EVENT'; payload: string }
Expand All @@ -49,7 +47,6 @@ const initialState: AppState = {
noCodesInitialized: false,
userInfo: null,
products: null,
offerings: null,
entitlements: null,
remoteConfigs: null,
noCodesEvents: [],
Expand Down Expand Up @@ -114,10 +111,7 @@ class Store {

case 'SET_PRODUCTS':
return { ...state, products: action.payload };

case 'SET_OFFERINGS':
return { ...state, offerings: action.payload };


case 'SET_ENTITLEMENTS':
return { ...state, entitlements: action.payload };

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@qonversion/capacitor-plugin",
"version": "1.6.0",
"version": "1.7.0",
"description": "Qonversion provides full in-app purchases infrastructure, so you do not need to build your own server for receipt validation. Implement in-app subscriptions, validate user receipts, check subscription status, and provide access to your app features and content using our StoreKit wrapper and Google Play Billing wrapper.",
"main": "dist/plugin.cjs.js",
"module": "dist/esm/index.js",
Expand Down
4 changes: 3 additions & 1 deletion src/QonversionApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,9 @@ export interface QonversionApi {
*
* @returns the promise with Qonversion offerings
*
* @see [Offerings](https://qonversion.io/docs/offerings) for more details
* @deprecated Offerings are deprecated. Manage paywall products with Remote Configs instead: https://documentation.qonversion.io/docs/migrate-offerings-to-remote-configs
*
* @see [Migrate Offerings to Remote Configs](https://documentation.qonversion.io/docs/migrate-offerings-to-remote-configs) for more details
*/
offerings(): Promise<Offerings | null>;

Expand Down
11 changes: 10 additions & 1 deletion src/dto/Product.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,17 @@ export class Product {
storeId: string | null;

/**
* Identifier of the base plan for Google product.
* Identifier of the base plan for a Google Play subscription product.
* Android only. Null for one-time products - use {@link purchaseOptionId} for those.
*/
basePlanId: string | null;

/**
* Identifier of the Google Play purchase option for a one-time (in-app) product.
* Android only. Null for subscription products - use {@link basePlanId} for those.
*/
purchaseOptionId: string | null;

/**
* Google Play Store details of this product.
* Android only. Null for iOS, or if the product was not found.
Expand Down Expand Up @@ -63,6 +70,7 @@ export class Product {
qonversionId: string,
storeId: string,
basePlanId: string | null,
purchaseOptionId: string | null,
storeDetails: ProductStoreDetails | null,
skProduct: SKProduct | null,
offeringId: string | null,
Expand All @@ -79,6 +87,7 @@ export class Product {
this.qonversionId = qonversionId;
this.storeId = storeId;
this.basePlanId = basePlanId;
this.purchaseOptionId = purchaseOptionId;
this.storeDetails = storeDetails;
this.skProduct = skProduct;
this.offeringId = offeringId;
Expand Down
Loading
Loading