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 android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def kotlin_version = getExtOrDefault("kotlinVersion")
dependencies {
implementation "com.facebook.react:react-android"
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
implementation "io.qonversion:sandwich:7.10.1"
implementation "io.qonversion:sandwich:7.11.0"
}

if (isNewArchitectureEnabled()) {
Expand Down
3 changes: 0 additions & 3 deletions example/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import ProductsScreen from './screens/ProductsScreen';
import ProductDetailScreen from './screens/ProductDetailScreen';
import EntitlementsScreen from './screens/EntitlementsScreen';
import EntitlementDetailScreen from './screens/EntitlementDetailScreen';
import OfferingsScreen from './screens/OfferingsScreen';
import RemoteConfigsScreen from './screens/RemoteConfigsScreen';
import UserScreen from './screens/UserScreen';
import NoCodesScreen from './screens/NoCodesScreen';
Expand Down Expand Up @@ -113,8 +112,6 @@ const App: React.FC = () => {
) : (
<EntitlementsScreen />
);
case 'offerings':
return <OfferingsScreen />;
case 'remoteConfigs':
return <RemoteConfigsScreen />;
case 'user':
Expand Down
1 change: 0 additions & 1 deletion example/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ export { default as SkeletonLoader } from './components/SkeletonLoader';
export { default as MainScreen } from './screens/MainScreen';
export { default as ProductsScreen } from './screens/ProductsScreen';
export { default as EntitlementsScreen } from './screens/EntitlementsScreen';
export { default as OfferingsScreen } from './screens/OfferingsScreen';
export { default as RemoteConfigsScreen } from './screens/RemoteConfigsScreen';
export { default as UserScreen } from './screens/UserScreen';
export { default as NoCodesScreen } from './screens/NoCodesScreen';
Expand Down
1 change: 0 additions & 1 deletion example/src/screens/MainScreen/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ const MainScreen: React.FC = () => {
const menuItems = [
{ id: 'products', title: 'Products' },
{ id: 'entitlements', title: 'Entitlements' },
{ id: 'offerings', title: 'Offerings' },
{ id: 'remoteConfigs', title: 'Remote Configs' },
{ id: 'user', title: 'User' },
{ id: 'noCodes', title: 'No-Codes' },
Expand Down
82 changes: 0 additions & 82 deletions example/src/screens/OfferingsScreen/index.tsx

This file was deleted.

113 changes: 0 additions & 113 deletions example/src/screens/OfferingsScreen/styles.ts

This file was deleted.

1 change: 0 additions & 1 deletion example/src/screens/ProductDetailScreen/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@ const ProductDetailScreen: React.FC<ProductDetailScreenProps> = ({
{renderField('Store ID', product.storeId)}
{renderField('Base Plan ID', product.basePlanId)}
{renderField('Type', product.type)}
{renderField('Offering ID', product.offeringId)}
</View>

<View style={styles.section}>
Expand Down
6 changes: 0 additions & 6 deletions example/src/store/AppStore.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import React from 'react';
import {
Offerings,
Product,
RemoteConfigList,
User,
Expand All @@ -10,7 +9,6 @@ import Entitlement from '../../../src/dto/Entitlement';
// Global Store (Redux-like pattern)
export interface AppState {
products: Map<string, Product> | null;
offerings: Offerings | null;
entitlements: Map<string, Entitlement> | null;
remoteConfigs: RemoteConfigList | null;
userInfo: User | null;
Expand All @@ -29,7 +27,6 @@ export interface AppState {

export type AppAction =
| { 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: 'SET_USER_INFO'; payload: User }
Expand All @@ -48,7 +45,6 @@ export type AppAction =

export const initialState: AppState = {
products: null,
offerings: null,
entitlements: null,
remoteConfigs: null,
userInfo: null,
Expand All @@ -65,8 +61,6 @@ export function appReducer(state: AppState, action: AppAction): AppState {
switch (action.type) {
case 'SET_PRODUCTS':
return { ...state, products: action.payload };
case 'SET_OFFERINGS':
return { ...state, offerings: action.payload };
case 'SET_ENTITLEMENTS':
return { ...state, entitlements: action.payload };
case 'SET_REMOTE_CONFIGS':
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@qonversion/react-native-sdk",
"title": "React Native Qonversion",
"version": "10.9.0",
"version": "10.10.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": "./lib/module/index.js",
"types": "./lib/typescript/src/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion qonversion-react-native-sdk.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ Pod::Spec.new do |s|
s.source_files = "ios/**/*.{h,m,mm,cpp,swift}"
s.private_header_files = "ios/**/*.h"

s.dependency "QonversionSandwich", "7.10.1"
s.dependency "QonversionSandwich", "7.11.0"
install_modules_dependencies(s)
end
3 changes: 2 additions & 1 deletion src/QonversionApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,10 @@ export interface QonversionApi {
* set of products with discounts later on if a user has not converted.
* Offerings allow changing the products offered remotely without releasing app updates.
*
* @deprecated Offerings are deprecated. Manage paywall products with Remote Configs instead: https://documentation.qonversion.io/docs/migrate-offerings-to-remote-configs
* @returns the promise with Qonversion offerings
*
* @see [Offerings](https://qonversion.io/docs/offerings) for more details
* @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 @@ -11,10 +11,17 @@ 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 @@ -66,6 +73,7 @@ class Product {
qonversionId: string,
storeId: string,
basePlanId: string | null,
purchaseOptionId: string | null,
storeDetails: ProductStoreDetails | null,
skProduct: SKProduct | null,
offeringId: string | null,
Expand All @@ -82,6 +90,7 @@ 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
12 changes: 10 additions & 2 deletions src/dto/storeProducts/ProductStoreDetails.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,17 @@ import ProductInAppDetails from "./ProductInAppDetails";
*/
class ProductStoreDetails {
/**
* Identifier of the base plan to which these details relate.
* Null for in-app products.
* Identifier of the base plan for a Google Play subscription product.
* 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.
* Null for subscription products - use {@link basePlanId} for those.
*/
purchaseOptionId: string | null;

/**
* Identifier of the subscription or the in-app product.
*/
Expand Down Expand Up @@ -111,6 +117,7 @@ class ProductStoreDetails {

constructor(
basePlanId: string | null,
purchaseOptionId: string | null,
productId: string,
name: string,
title: string,
Expand All @@ -129,6 +136,7 @@ class ProductStoreDetails {
isInstallment: boolean,
) {
this.basePlanId = basePlanId;
this.purchaseOptionId = purchaseOptionId;
this.productId = productId;
this.name = name;
this.title = title;
Expand Down
Loading
Loading