From e1a3823658b3e0ad018e7ab0d9c4de67fbb69a8e Mon Sep 17 00:00:00 2001 From: Kamo Spertsyan Date: Wed, 26 Jun 2024 15:24:29 +0300 Subject: [PATCH 1/6] Qonversion error codes handling improvements. --- .../com/reactlibrary/QonversionModule.java | 28 +-------- example/ios/Podfile.lock | 20 +++--- ios/RNQonversion.h | 4 -- ios/RNQonversion.m | 25 +------- src/dto/QonversionError.ts | 6 +- src/dto/enums.ts | 41 +++++++++++++ src/internal/Mapper.ts | 61 +++++++++++++++++-- src/internal/QonversionInternal.ts | 8 +-- src/internal/utils.ts | 4 -- 9 files changed, 118 insertions(+), 79 deletions(-) diff --git a/android/src/main/java/com/reactlibrary/QonversionModule.java b/android/src/main/java/com/reactlibrary/QonversionModule.java index a207a1b..4474b48 100644 --- a/android/src/main/java/com/reactlibrary/QonversionModule.java +++ b/android/src/main/java/com/reactlibrary/QonversionModule.java @@ -15,7 +15,6 @@ import android.app.Application; import androidx.annotation.NonNull; import androidx.annotation.Nullable; -import io.qonversion.sandwich.PurchaseResultListener; import io.qonversion.sandwich.QonversionEventsListener; import io.qonversion.sandwich.QonversionSandwich; import io.qonversion.sandwich.SandwichError; @@ -24,10 +23,6 @@ public class QonversionModule extends ReactContextBaseJavaModule implements Qonv private final QonversionSandwich qonversionSandwich; - private static final String EVENT_ENTITLEMENTS_UPDATED = "entitlements_updated"; - - private static final String ERROR_CODE_PURCHASE_CANCELLED_BY_USER = "PURCHASE_CANCELLED_BY_USER"; - private DeviceEventManagerModule.RCTDeviceEventEmitter eventEmitter = null; public QonversionModule(ReactApplicationContext reactContext) { @@ -85,7 +80,7 @@ public void syncHistoricalData() { @ReactMethod public void purchase(String productId, @Nullable String offerId, @Nullable Boolean applyOffer, final Promise promise) { - qonversionSandwich.purchase(productId, offerId, applyOffer, getPurchaseResultListener(promise)); + qonversionSandwich.purchase(productId, offerId, applyOffer, getResultListener(promise)); } @ReactMethod @@ -103,7 +98,7 @@ public void updatePurchase( applyOffer, oldProductId, updatePolicyKey, - getPurchaseResultListener(promise) + getResultListener(promise) ); } @@ -221,23 +216,4 @@ public void onEntitlementsUpdated(@NonNull Map map) { eventEmitter.emit(EVENT_ENTITLEMENTS_UPDATED, payload); } } - - private PurchaseResultListener getPurchaseResultListener(final Promise promise) { - return new PurchaseResultListener() { - @Override - public void onSuccess(@NonNull Map map) { - final WritableMap payload = EntitiesConverter.convertMapToWritableMap(map); - promise.resolve(payload); - } - - @Override - public void onError(@NonNull SandwichError error, boolean isCancelled) { - if (isCancelled) { - Utils.rejectWithError(error, promise, ERROR_CODE_PURCHASE_CANCELLED_BY_USER); - } else { - Utils.rejectWithError(error, promise); - } - } - }; - } } diff --git a/example/ios/Podfile.lock b/example/ios/Podfile.lock index 121e810..3db8161 100644 --- a/example/ios/Podfile.lock +++ b/example/ios/Podfile.lock @@ -75,11 +75,11 @@ PODS: - glog (0.3.5) - libevent (2.1.12) - OpenSSL-Universal (1.1.1100) - - Qonversion (5.9.0): - - Qonversion/Main (= 5.9.0) - - Qonversion/Main (5.9.0) - - QonversionSandwich (4.4.1): - - Qonversion (= 5.9.0) + - Qonversion (5.10.0): + - Qonversion/Main (= 5.10.0) + - Qonversion/Main (5.10.0) + - QonversionSandwich (4.5.0): + - Qonversion (= 5.10.0) - RCT-Folly (2021.07.22.00): - boost - DoubleConversion @@ -289,8 +289,8 @@ PODS: - React-jsinspector (0.70.5) - React-logger (0.70.5): - glog - - react-native-qonversion (7.2.0): - - QonversionSandwich (= 4.4.1) + - react-native-qonversion (7.5.0): + - QonversionSandwich (= 4.5.0) - React - React-perflogger (0.70.5) - React-RCTActionSheet (0.70.5): @@ -534,8 +534,8 @@ SPEC CHECKSUMS: glog: 04b94705f318337d7ead9e6d17c019bd9b1f6b1b libevent: 4049cae6c81cdb3654a443be001fb9bdceff7913 OpenSSL-Universal: ebc357f1e6bc71fa463ccb2fe676756aff50e88c - Qonversion: 2bba69076355a256e12ef372ff7ea4c1a3d5a054 - QonversionSandwich: ec794430070a687b7eaf450211f3b8a108c26d50 + Qonversion: 879e542136f238e963d5488ef31983f28bd315ef + QonversionSandwich: 40d9bb9065d0cc693b959552ad053e3d4bfc1a33 RCT-Folly: 0080d0a6ebf2577475bda044aa59e2ca1f909cda RCTRequired: 21229f84411088e5d8538f21212de49e46cc83e2 RCTTypeSafety: 62eed57a32924b09edaaf170a548d1fc96223086 @@ -550,7 +550,7 @@ SPEC CHECKSUMS: React-jsiexecutor: 31564fa6912459921568e8b0e49024285a4d584b React-jsinspector: badd81696361249893a80477983e697aab3c1a34 React-logger: fdda34dd285bdb0232e059b19d9606fa0ec3bb9c - react-native-qonversion: 280d063073ae59575c5a06bbbd2617f42517c48f + react-native-qonversion: 523674221e73b04388467c3abead911d1a414577 React-perflogger: e68d3795cf5d247a0379735cbac7309adf2fb931 React-RCTActionSheet: 05452c3b281edb27850253db13ecd4c5a65bc247 React-RCTAnimation: 578eebac706428e68466118e84aeacf3a282b4da diff --git a/ios/RNQonversion.h b/ios/RNQonversion.h index 4a45d97..b4d2443 100644 --- a/ios/RNQonversion.h +++ b/ios/RNQonversion.h @@ -9,8 +9,4 @@ completion:(RCTResponseSenderBlock)completion rejecter:(RCTPromiseRejectBlock)reject; -- (void)handlePurchaseResult:(NSDictionary *)result - error:(SandwichError *)error - completion:(RCTResponseSenderBlock)completion - rejecter:(RCTPromiseRejectBlock)reject; @end diff --git a/ios/RNQonversion.m b/ios/RNQonversion.m index b67ca38..53f19f0 100644 --- a/ios/RNQonversion.m +++ b/ios/RNQonversion.m @@ -48,7 +48,7 @@ + (BOOL)requiresMainQueueSetup RCT_EXPORT_METHOD(purchase:(NSString *)productId completion:(RCTResponseSenderBlock)completion rejecter:(RCTPromiseRejectBlock)reject) { [_qonversionSandwich purchase:productId completion:^(NSDictionary * _Nullable result, SandwichError * _Nullable error) { - [self handlePurchaseResult:result error:error completion:completion rejecter:reject]; + [self handleResult:result error:error completion:completion rejecter:reject]; }]; } @@ -168,7 +168,7 @@ + (BOOL)requiresMainQueueSetup RCT_EXPORT_METHOD(promoPurchase:(NSString *)storeProductId completion:(RCTResponseSenderBlock)completion rejecter:(RCTPromiseRejectBlock)reject) { [_qonversionSandwich promoPurchase:storeProductId completion:^(NSDictionary * _Nullable result, SandwichError * _Nullable error) { - [self handlePurchaseResult:result error:error completion:completion rejecter:reject]; + [self handleResult:result error:error completion:completion rejecter:reject]; }]; } @@ -197,27 +197,6 @@ - (void)handleResult:(NSDictionary *)result } } -- (void)handlePurchaseResult:(NSDictionary *)result - error:(SandwichError *)error - completion:(RCTResponseSenderBlock)completion - rejecter:(RCTPromiseRejectBlock)reject { - if (error) { - NSNumber *isCancelled = error.additionalInfo[@"isCancelled"]; - if (isCancelled.boolValue == true) { - reject(errorCodePurchaseCancelledByUser, error.details, nil); - } else { - reject(error.code, error.details, nil); - } - return; - } - - if (result) { - completion(@[result]); - } else { - completion(@[]); - } -} - #pragma mark - QonversionEventListener - (void)shouldPurchasePromoProductWith:(NSString * _Nonnull)productId { diff --git a/src/dto/QonversionError.ts b/src/dto/QonversionError.ts index 6239e74..1f89e02 100644 --- a/src/dto/QonversionError.ts +++ b/src/dto/QonversionError.ts @@ -1,11 +1,13 @@ +import {QonversionErrorCode} from './enums'; + class QonversionError { - code: string; + code: QonversionErrorCode; domain?: string; description: string; additionalMessage: string; constructor( - code: string, + code: QonversionErrorCode, description: string, additionalMessage: string, domain?: string, diff --git a/src/dto/enums.ts b/src/dto/enums.ts index 204d53a..1d38ac0 100644 --- a/src/dto/enums.ts +++ b/src/dto/enums.ts @@ -310,3 +310,44 @@ export enum ScreenPresentationStyle { */ NO_ANIMATION = 'NoAnimation', } + +export enum QonversionErrorCode { + UNKNOWN = "Unknown", + API_RATE_LIMIT_EXCEEDED = "ApiRateLimitExceeded", + APPLE_STORE_ERROR = "AppleStoreError", + BACKEND_ERROR = "BackendError", + BILLING_UNAVAILABLE = "BillingUnavailable", + CLIENT_INVALID = "ClientInvalid", + CLOUD_SERVICE_NETWORK_CONNECTION_FAILED = "CloudServiceNetworkConnectionFailed", + CLOUD_SERVICE_PERMISSION_DENIED = "CloudServicePermissionDenied", + CLOUD_SERVICE_REVOKED = "CloudServiceRevoked", + FAILED_TO_RECEIVE_DATA = "FailedToReceiveData", + FEATURE_NOT_SUPPORTED = "FeatureNotSupported", + FRAUD_PURCHASE = "FraudPurchase", + INCORRECT_REQUEST = "IncorrectRequest", + INTERNAL_ERROR = "InternalError", + INVALID_CLIENT_UID = "InvalidClientUid", + INVALID_CREDENTIALS = "InvalidCredentials", + INVALID_STORE_CREDENTIALS = "InvalidStoreCredentials", + LAUNCH_ERROR = "LaunchError", + NETWORK_CONNECTION_FAILED = "NetworkConnectionFailed", + OFFERINGS_NOT_FOUND = "OfferingsNotFound", + PAYMENT_INVALID = "PaymentInvalid", + PAYMENT_NOT_ALLOWED = "PaymentNotAllowed", + PLAY_STORE_ERROR = "PlayStoreError", + PRIVACY_ACKNOWLEDGEMENT_REQUIRED = "PrivacyAcknowledgementRequired", + PRODUCT_ALREADY_OWNED = "ProductAlreadyOwned", + PRODUCT_NOT_FOUND = "ProductNotFound", + PRODUCT_NOT_OWNED = "ProductNotOwned", + PROJECT_CONFIG_ERROR = "ProjectConfigError", + PURCHASE_CANCELED = "PurchaseCanceled", + PURCHASE_INVALID = "PurchaseInvalid", + PURCHASE_PENDING = "PurchasePending", + PURCHASE_UNSPECIFIED = "PurchaseUnspecified", + RECEIPT_VALIDATION_ERROR = "ReceiptValidationError", + REMOTE_CONFIGURATION_NOT_AVAILABLE = "RemoteConfigurationNotAvailable", + RESPONSE_PARSING_FAILED = "ResponseParsingFailed", + STORE_PRODUCT_NOT_AVAILABLE = "StoreProductNotAvailable", + UNAUTHORIZED_REQUEST_DATA = "UnauthorizedRequestData", + UNKNOWN_CLIENT_PLATFORM = "UnknownClientPlatform", +} diff --git a/src/internal/Mapper.ts b/src/internal/Mapper.ts index 2fd3b7f..56acce0 100644 --- a/src/internal/Mapper.ts +++ b/src/internal/Mapper.ts @@ -8,13 +8,14 @@ import { OfferingTag, PricingPhaseRecurrenceMode, PricingPhaseType, - SubscriptionPeriodUnit, ProductType, + QonversionErrorCode, RemoteConfigurationAssignmentType, RemoteConfigurationSourceType, SKPeriodUnit, SKProductDiscountPaymentMode, SKProductDiscountType, + SubscriptionPeriodUnit, TransactionEnvironment, TransactionOwnershipType, TransactionType, @@ -954,18 +955,21 @@ class Mapper { payload["type"], payload["value"], this.convertQonversionError(payload["error"]) - ) + ); } static convertQonversionError( payload: Record | undefined ): QonversionError | undefined { - return payload ? new QonversionError( - payload["code"], + if (!payload) return undefined; + + const code = this.convertErrorCode(payload["code"]); + return new QonversionError( + code, payload["description"], payload["additionalMessage"], payload["domain"], - ) : undefined; + ); } static convertAutomationsEvent( @@ -974,7 +978,7 @@ class Mapper { return new AutomationsEvent( automationsEvent.type, automationsEvent.timestamp - ) + ); } static convertUserInfo(user: QUser): User { @@ -1049,6 +1053,51 @@ class Mapper { animated: config.animated ? '1' : '0', }; } + + static convertErrorCode(code: string): QonversionErrorCode { + switch (code) { + case QonversionErrorCode.UNKNOWN: return QonversionErrorCode.UNKNOWN; + case QonversionErrorCode.API_RATE_LIMIT_EXCEEDED: return QonversionErrorCode.API_RATE_LIMIT_EXCEEDED; + case QonversionErrorCode.APPLE_STORE_ERROR: return QonversionErrorCode.APPLE_STORE_ERROR; + case QonversionErrorCode.BACKEND_ERROR: return QonversionErrorCode.BACKEND_ERROR; + case QonversionErrorCode.BILLING_UNAVAILABLE: return QonversionErrorCode.BILLING_UNAVAILABLE; + case QonversionErrorCode.CLIENT_INVALID: return QonversionErrorCode.CLIENT_INVALID; + case QonversionErrorCode.CLOUD_SERVICE_NETWORK_CONNECTION_FAILED: return QonversionErrorCode.CLOUD_SERVICE_NETWORK_CONNECTION_FAILED; + case QonversionErrorCode.CLOUD_SERVICE_PERMISSION_DENIED: return QonversionErrorCode.CLOUD_SERVICE_PERMISSION_DENIED; + case QonversionErrorCode.CLOUD_SERVICE_REVOKED: return QonversionErrorCode.CLOUD_SERVICE_REVOKED; + case QonversionErrorCode.FAILED_TO_RECEIVE_DATA: return QonversionErrorCode.FAILED_TO_RECEIVE_DATA; + case QonversionErrorCode.FEATURE_NOT_SUPPORTED: return QonversionErrorCode.FEATURE_NOT_SUPPORTED; + case QonversionErrorCode.FRAUD_PURCHASE: return QonversionErrorCode.FRAUD_PURCHASE; + case QonversionErrorCode.INCORRECT_REQUEST: return QonversionErrorCode.INCORRECT_REQUEST; + case QonversionErrorCode.INTERNAL_ERROR: return QonversionErrorCode.INTERNAL_ERROR; + case QonversionErrorCode.INVALID_CLIENT_UID: return QonversionErrorCode.INVALID_CLIENT_UID; + case QonversionErrorCode.INVALID_CREDENTIALS: return QonversionErrorCode.INVALID_CREDENTIALS; + case QonversionErrorCode.INVALID_STORE_CREDENTIALS: return QonversionErrorCode.INVALID_STORE_CREDENTIALS; + case QonversionErrorCode.LAUNCH_ERROR: return QonversionErrorCode.LAUNCH_ERROR; + case QonversionErrorCode.NETWORK_CONNECTION_FAILED: return QonversionErrorCode.NETWORK_CONNECTION_FAILED; + case QonversionErrorCode.OFFERINGS_NOT_FOUND: return QonversionErrorCode.OFFERINGS_NOT_FOUND; + case QonversionErrorCode.PAYMENT_INVALID: return QonversionErrorCode.PAYMENT_INVALID; + case QonversionErrorCode.PAYMENT_NOT_ALLOWED: return QonversionErrorCode.PAYMENT_NOT_ALLOWED; + case QonversionErrorCode.PLAY_STORE_ERROR: return QonversionErrorCode.PLAY_STORE_ERROR; + case QonversionErrorCode.PRIVACY_ACKNOWLEDGEMENT_REQUIRED: return QonversionErrorCode.PRIVACY_ACKNOWLEDGEMENT_REQUIRED; + case QonversionErrorCode.PRODUCT_ALREADY_OWNED: return QonversionErrorCode.PRODUCT_ALREADY_OWNED; + case QonversionErrorCode.PRODUCT_NOT_FOUND: return QonversionErrorCode.PRODUCT_NOT_FOUND; + case QonversionErrorCode.PRODUCT_NOT_OWNED: return QonversionErrorCode.PRODUCT_NOT_OWNED; + case QonversionErrorCode.PROJECT_CONFIG_ERROR: return QonversionErrorCode.PROJECT_CONFIG_ERROR; + case QonversionErrorCode.PURCHASE_CANCELED: return QonversionErrorCode.PURCHASE_CANCELED; + case QonversionErrorCode.PURCHASE_INVALID: return QonversionErrorCode.PURCHASE_INVALID; + case QonversionErrorCode.PURCHASE_PENDING: return QonversionErrorCode.PURCHASE_PENDING; + case QonversionErrorCode.PURCHASE_UNSPECIFIED: return QonversionErrorCode.PURCHASE_UNSPECIFIED; + case QonversionErrorCode.RECEIPT_VALIDATION_ERROR: return QonversionErrorCode.RECEIPT_VALIDATION_ERROR; + case QonversionErrorCode.REMOTE_CONFIGURATION_NOT_AVAILABLE: return QonversionErrorCode.REMOTE_CONFIGURATION_NOT_AVAILABLE; + case QonversionErrorCode.RESPONSE_PARSING_FAILED: return QonversionErrorCode.RESPONSE_PARSING_FAILED; + case QonversionErrorCode.STORE_PRODUCT_NOT_AVAILABLE: return QonversionErrorCode.STORE_PRODUCT_NOT_AVAILABLE; + case QonversionErrorCode.UNAUTHORIZED_REQUEST_DATA: return QonversionErrorCode.UNAUTHORIZED_REQUEST_DATA; + case QonversionErrorCode.UNKNOWN_CLIENT_PLATFORM: return QonversionErrorCode.UNKNOWN_CLIENT_PLATFORM; + } + + return QonversionErrorCode.UNKNOWN; + } } export default Mapper; diff --git a/src/internal/QonversionInternal.ts b/src/internal/QonversionInternal.ts index f805e20..a614be5 100644 --- a/src/internal/QonversionInternal.ts +++ b/src/internal/QonversionInternal.ts @@ -1,11 +1,11 @@ import {NativeEventEmitter, NativeModules} from "react-native"; -import {AttributionProvider, UserPropertyKey} from "../dto/enums"; +import {AttributionProvider, QonversionErrorCode, UserPropertyKey} from "../dto/enums"; import IntroEligibility from "../dto/IntroEligibility"; import Mapper, {QEntitlement} from "./Mapper"; import Offerings from "../dto/Offerings"; import Entitlement from "../dto/Entitlement"; import Product from "../dto/Product"; -import {DefinedNativeErrorCodes, isAndroid, isIos} from "./utils"; +import {isAndroid, isIos} from "./utils"; import {EntitlementsUpdateListener} from '../dto/EntitlementsUpdateListener'; import {PromoPurchasesListener} from '../dto/PromoPurchasesListener'; import User from '../dto/User'; @@ -71,7 +71,7 @@ export default class QonversionInternal implements QonversionApi { return mappedPermissions; } catch (e) { - e.userCanceled = e.code === DefinedNativeErrorCodes.PURCHASE_CANCELLED_BY_USER; + e.userCanceled = e.code === QonversionErrorCode.PURCHASE_CANCELED; throw e; } } @@ -95,7 +95,7 @@ export default class QonversionInternal implements QonversionApi { return mappedPermissions; } catch (e) { - e.userCanceled = e.code === DefinedNativeErrorCodes.PURCHASE_CANCELLED_BY_USER; + e.userCanceled = e.code === QonversionErrorCode.PURCHASE_CANCELED; throw e; } } diff --git a/src/internal/utils.ts b/src/internal/utils.ts index 1e16896..80cac5d 100644 --- a/src/internal/utils.ts +++ b/src/internal/utils.ts @@ -7,7 +7,3 @@ export const isIos = (): boolean => { export const isAndroid = (): boolean => { return Platform.OS === "android" }; - -export enum DefinedNativeErrorCodes { - PURCHASE_CANCELLED_BY_USER = "PURCHASE_CANCELLED_BY_USER" -} From d10b33d5c7e5873df6ebd7ccde4b68f130c4033d Mon Sep 17 00:00:00 2001 From: Kamo Spertsyan Date: Wed, 26 Jun 2024 15:41:06 +0300 Subject: [PATCH 2/6] Installment plan details supported. --- .../ProductInstallmentPlanDetails.ts | 28 +++++++++++ src/dto/storeProducts/ProductOfferDetails.ts | 8 ++++ src/dto/storeProducts/ProductStoreDetails.ts | 8 ++++ src/index.ts | 1 + src/internal/Mapper.ts | 47 ++++++++++++++----- 5 files changed, 80 insertions(+), 12 deletions(-) create mode 100644 src/dto/storeProducts/ProductInstallmentPlanDetails.ts diff --git a/src/dto/storeProducts/ProductInstallmentPlanDetails.ts b/src/dto/storeProducts/ProductInstallmentPlanDetails.ts new file mode 100644 index 0000000..8fce5cc --- /dev/null +++ b/src/dto/storeProducts/ProductInstallmentPlanDetails.ts @@ -0,0 +1,28 @@ +/** + * This class represents the details about the installment plan for a subscription product. + */ +class ProductInstallmentPlanDetails { + /** + * Committed payments count after a user signs up for this subscription plan. + */ + commitmentPaymentsCount: number; + + /** + * Subsequent committed payments count after this subscription plan renews. + * + * Returns 0 if the installment plan doesn't have any subsequent commitment, + * which means this subscription plan will fall back to a normal + * non-installment monthly plan when the plan renews. + */ + subsequentCommitmentPaymentsCount: number; + + constructor( + commitmentPaymentsCount: number, + subsequentCommitmentPaymentsCount: number + ) { + this.commitmentPaymentsCount = commitmentPaymentsCount; + this.subsequentCommitmentPaymentsCount = subsequentCommitmentPaymentsCount; + } +} + +export default ProductInstallmentPlanDetails; diff --git a/src/dto/storeProducts/ProductOfferDetails.ts b/src/dto/storeProducts/ProductOfferDetails.ts index d78b671..a465370 100644 --- a/src/dto/storeProducts/ProductOfferDetails.ts +++ b/src/dto/storeProducts/ProductOfferDetails.ts @@ -1,4 +1,5 @@ import ProductPricingPhase from "./ProductPricingPhase"; +import ProductInstallmentPlanDetails from './ProductInstallmentPlanDetails'; /** * This class contains all the information about the Google subscription offer details. @@ -36,6 +37,11 @@ class ProductOfferDetails { */ basePlan: ProductPricingPhase | null; + /** + * Additional details of an installment plan, if exists. + */ + installmentPlanDetails: ProductInstallmentPlanDetails | null; + /** * A trial phase details, if exists. */ @@ -71,6 +77,7 @@ class ProductOfferDetails { tags: string[], pricingPhases: ProductPricingPhase[], basePlan: ProductPricingPhase | null, + installmentPlanDetails: ProductInstallmentPlanDetails | null, introPhase: ProductPricingPhase | null, trialPhase: ProductPricingPhase | null, hasTrial: boolean, @@ -83,6 +90,7 @@ class ProductOfferDetails { this.tags = tags; this.pricingPhases = pricingPhases; this.basePlan = basePlan; + this.installmentPlanDetails = installmentPlanDetails; this.introPhase = introPhase; this.trialPhase = trialPhase; this.hasTrial = hasTrial; diff --git a/src/dto/storeProducts/ProductStoreDetails.ts b/src/dto/storeProducts/ProductStoreDetails.ts index 504501a..0a2526f 100644 --- a/src/dto/storeProducts/ProductStoreDetails.ts +++ b/src/dto/storeProducts/ProductStoreDetails.ts @@ -103,6 +103,12 @@ class ProductStoreDetails { */ isPrepaid: boolean; + /** + * True, if the subscription product is installment, which means that users commit + * to pay for a specified amount of periods every month. + */ + isInstallment: boolean; + constructor( basePlanId: string | null, productId: string, @@ -120,6 +126,7 @@ class ProductStoreDetails { isInApp: boolean, isSubscription: boolean, isPrepaid: boolean, + isInstallment: boolean, ) { this.basePlanId = basePlanId; this.productId = productId; @@ -137,6 +144,7 @@ class ProductStoreDetails { this.isInApp = isInApp; this.isSubscription = isSubscription; this.isPrepaid = isPrepaid; + this.isInstallment = isInstallment; } } diff --git a/src/index.ts b/src/index.ts index 6f1feaa..06b8a8e 100644 --- a/src/index.ts +++ b/src/index.ts @@ -27,6 +27,7 @@ export { default as User } from './dto/User'; export { default as UserProperty } from './dto/UserProperty'; export { default as UserProperties } from './dto/UserProperties'; export { default as ProductInAppDetails } from './dto/storeProducts/ProductInAppDetails'; +export { default as ProductInstallmentPlanDetails } from './dto/storeProducts/ProductInstallmentPlanDetails'; export { default as ProductOfferDetails } from './dto/storeProducts/ProductOfferDetails'; export { default as ProductPrice } from './dto/storeProducts/ProductPrice'; export { default as ProductPricingPhase } from './dto/storeProducts/ProductPricingPhase'; diff --git a/src/internal/Mapper.ts b/src/internal/Mapper.ts index 2fd3b7f..5a04bd2 100644 --- a/src/internal/Mapper.ts +++ b/src/internal/Mapper.ts @@ -48,6 +48,7 @@ import ProductOfferDetails from "../dto/storeProducts/ProductOfferDetails"; import ProductInAppDetails from "../dto/storeProducts/ProductInAppDetails"; import ProductPrice from "../dto/storeProducts/ProductPrice"; import ProductPricingPhase from "../dto/storeProducts/ProductPricingPhase"; +import ProductInstallmentPlanDetails from '../dto/storeProducts/ProductInstallmentPlanDetails'; type QProduct = { id: string; @@ -80,6 +81,7 @@ type QProductStoreDetails = { isInApp: boolean, isSubscription: boolean, isPrepaid: boolean, + isInstallment: boolean, } type QSubscriptionPeriod = { @@ -99,6 +101,11 @@ type QProductPricingPhase = { isBasePlan: boolean, } +type QProductInstallmentPlanDetails = { + commitmentPaymentsCount: number; + subsequentCommitmentPaymentsCount: number; +} + type QProductOfferDetails = { basePlanId: string, offerId?: string | null, @@ -106,6 +113,7 @@ type QProductOfferDetails = { tags: string[], pricingPhases: QProductPricingPhase[], basePlan?: QProductPricingPhase | null, + installmentPlanDetails?: QProductInstallmentPlanDetails | null, trialPhase?: QProductPricingPhase | null, introPhase: QProductPricingPhase | null, hasTrial: boolean, @@ -749,27 +757,41 @@ class Mapper { return result; } - static convertProductOfferDetails(defaultOfferDetail: QProductOfferDetails): ProductOfferDetails { - let basePlan = Mapper.convertProductPricingPhase(defaultOfferDetail.basePlan); - let trialPhase = Mapper.convertProductPricingPhase(defaultOfferDetail.trialPhase); - let introPhase = Mapper.convertProductPricingPhase(defaultOfferDetail.introPhase); + static convertProductInstallmentPlanDetails(installmentPlanDetails: QProductInstallmentPlanDetails | null | undefined): ProductInstallmentPlanDetails | null { + if (!installmentPlanDetails) { + return null; + } + + return new ProductInstallmentPlanDetails( + installmentPlanDetails.commitmentPaymentsCount, + installmentPlanDetails.subsequentCommitmentPaymentsCount, + ); + } + + static convertProductOfferDetails(offerDetails: QProductOfferDetails): ProductOfferDetails { + let basePlan = Mapper.convertProductPricingPhase(offerDetails.basePlan); + let trialPhase = Mapper.convertProductPricingPhase(offerDetails.trialPhase); + let introPhase = Mapper.convertProductPricingPhase(offerDetails.introPhase); + + let installmentPlanDetails = Mapper.convertProductInstallmentPlanDetails(offerDetails.installmentPlanDetails); - let pricingPhases = defaultOfferDetail.pricingPhases.map( + let pricingPhases = offerDetails.pricingPhases.map( pricingPhase => Mapper.convertProductPricingPhase(pricingPhase) ).filter(Boolean) as ProductPricingPhase[]; return new ProductOfferDetails( - defaultOfferDetail.basePlanId, - defaultOfferDetail.offerId ?? null, - defaultOfferDetail.offerToken, - defaultOfferDetail.tags, + offerDetails.basePlanId, + offerDetails.offerId ?? null, + offerDetails.offerToken, + offerDetails.tags, pricingPhases, basePlan, + installmentPlanDetails, introPhase, trialPhase, - defaultOfferDetail.hasTrial, - defaultOfferDetail.hasIntro, - defaultOfferDetail.hasTrialOrIntro, + offerDetails.hasTrial, + offerDetails.hasIntro, + offerDetails.hasTrialOrIntro, ); } @@ -834,6 +856,7 @@ class Mapper { productStoreDetails.isInApp, productStoreDetails.isSubscription, productStoreDetails.isPrepaid, + productStoreDetails.isInstallment, ); } From db977e28c43e1f85d9ebd4b6c79ac3a7d1e795a5 Mon Sep 17 00:00:00 2001 From: Kamo Spertsyan Date: Thu, 4 Jul 2024 11:50:54 +0300 Subject: [PATCH 3/6] Android fixes --- .../src/main/java/com/reactlibrary/QonversionModule.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/android/src/main/java/com/reactlibrary/QonversionModule.java b/android/src/main/java/com/reactlibrary/QonversionModule.java index 4474b48..235f145 100644 --- a/android/src/main/java/com/reactlibrary/QonversionModule.java +++ b/android/src/main/java/com/reactlibrary/QonversionModule.java @@ -23,6 +23,8 @@ public class QonversionModule extends ReactContextBaseJavaModule implements Qonv private final QonversionSandwich qonversionSandwich; + private static final String EVENT_ENTITLEMENTS_UPDATED = "entitlements_updated"; + private DeviceEventManagerModule.RCTDeviceEventEmitter eventEmitter = null; public QonversionModule(ReactApplicationContext reactContext) { @@ -80,7 +82,7 @@ public void syncHistoricalData() { @ReactMethod public void purchase(String productId, @Nullable String offerId, @Nullable Boolean applyOffer, final Promise promise) { - qonversionSandwich.purchase(productId, offerId, applyOffer, getResultListener(promise)); + qonversionSandwich.purchase(productId, offerId, applyOffer, Utils.getResultListener(promise)); } @ReactMethod @@ -98,7 +100,7 @@ public void updatePurchase( applyOffer, oldProductId, updatePolicyKey, - getResultListener(promise) + Utils.getResultListener(promise) ); } From e3fe37ee41fa9f09ce2499cfd6ef0c47a4df2378 Mon Sep 17 00:00:00 2001 From: Kamo Spertsyan Date: Thu, 4 Jul 2024 13:04:23 +0300 Subject: [PATCH 4/6] Error codes comments --- src/dto/enums.ts | 76 ++++++++++++++++++++++++------------------------ 1 file changed, 38 insertions(+), 38 deletions(-) diff --git a/src/dto/enums.ts b/src/dto/enums.ts index 1d38ac0..02c2016 100644 --- a/src/dto/enums.ts +++ b/src/dto/enums.ts @@ -312,42 +312,42 @@ export enum ScreenPresentationStyle { } export enum QonversionErrorCode { - UNKNOWN = "Unknown", - API_RATE_LIMIT_EXCEEDED = "ApiRateLimitExceeded", - APPLE_STORE_ERROR = "AppleStoreError", - BACKEND_ERROR = "BackendError", - BILLING_UNAVAILABLE = "BillingUnavailable", - CLIENT_INVALID = "ClientInvalid", - CLOUD_SERVICE_NETWORK_CONNECTION_FAILED = "CloudServiceNetworkConnectionFailed", - CLOUD_SERVICE_PERMISSION_DENIED = "CloudServicePermissionDenied", - CLOUD_SERVICE_REVOKED = "CloudServiceRevoked", - FAILED_TO_RECEIVE_DATA = "FailedToReceiveData", - FEATURE_NOT_SUPPORTED = "FeatureNotSupported", - FRAUD_PURCHASE = "FraudPurchase", - INCORRECT_REQUEST = "IncorrectRequest", - INTERNAL_ERROR = "InternalError", - INVALID_CLIENT_UID = "InvalidClientUid", - INVALID_CREDENTIALS = "InvalidCredentials", - INVALID_STORE_CREDENTIALS = "InvalidStoreCredentials", - LAUNCH_ERROR = "LaunchError", - NETWORK_CONNECTION_FAILED = "NetworkConnectionFailed", - OFFERINGS_NOT_FOUND = "OfferingsNotFound", - PAYMENT_INVALID = "PaymentInvalid", - PAYMENT_NOT_ALLOWED = "PaymentNotAllowed", - PLAY_STORE_ERROR = "PlayStoreError", - PRIVACY_ACKNOWLEDGEMENT_REQUIRED = "PrivacyAcknowledgementRequired", - PRODUCT_ALREADY_OWNED = "ProductAlreadyOwned", - PRODUCT_NOT_FOUND = "ProductNotFound", - PRODUCT_NOT_OWNED = "ProductNotOwned", - PROJECT_CONFIG_ERROR = "ProjectConfigError", - PURCHASE_CANCELED = "PurchaseCanceled", - PURCHASE_INVALID = "PurchaseInvalid", - PURCHASE_PENDING = "PurchasePending", - PURCHASE_UNSPECIFIED = "PurchaseUnspecified", - RECEIPT_VALIDATION_ERROR = "ReceiptValidationError", - REMOTE_CONFIGURATION_NOT_AVAILABLE = "RemoteConfigurationNotAvailable", - RESPONSE_PARSING_FAILED = "ResponseParsingFailed", - STORE_PRODUCT_NOT_AVAILABLE = "StoreProductNotAvailable", - UNAUTHORIZED_REQUEST_DATA = "UnauthorizedRequestData", - UNKNOWN_CLIENT_PLATFORM = "UnknownClientPlatform", + UNKNOWN = "Unknown", // Unknown error + API_RATE_LIMIT_EXCEEDED = "ApiRateLimitExceeded", // API requests rate limit exceeded + APPLE_STORE_ERROR = "AppleStoreError", // Apple Store error received + BACKEND_ERROR = "BackendError", // There was a backend error + BILLING_UNAVAILABLE = "BillingUnavailable", // The Billing service is unavailable on the device + CLIENT_INVALID = "ClientInvalid", // Client is not allowed to issue the request, etc + CLOUD_SERVICE_NETWORK_CONNECTION_FAILED = "CloudServiceNetworkConnectionFailed", // The device could not connect to the network + CLOUD_SERVICE_PERMISSION_DENIED = "CloudServicePermissionDenied", // User is not allowed to access cloud service information + CLOUD_SERVICE_REVOKED = "CloudServiceRevoked", // User has revoked permission to use this cloud service + FAILED_TO_RECEIVE_DATA = "FailedToReceiveData", // Could not receive data + FEATURE_NOT_SUPPORTED = "FeatureNotSupported", // The requested feature is not supported + FRAUD_PURCHASE = "FraudPurchase", // Fraud purchase was detected + INCORRECT_REQUEST = "IncorrectRequest", // Request failed + INTERNAL_ERROR = "InternalError", // Internal backend error + INVALID_CLIENT_UID = "InvalidClientUid", // Client Uid is invalid or not set + INVALID_CREDENTIALS = "InvalidCredentials", // Access token is invalid or not set + INVALID_STORE_CREDENTIALS = "InvalidStoreCredentials", // This account does not have access to the requested application + LAUNCH_ERROR = "LaunchError", // There was an error while launching Qonversion SDK + NETWORK_CONNECTION_FAILED = "NetworkConnectionFailed", // There was a network issue. Make sure that the Internet connection is available on the device + OFFERINGS_NOT_FOUND = "OfferingsNotFound", // No offerings found + PAYMENT_INVALID = "PaymentInvalid", // Purchase identifier was invalid, etc. + PAYMENT_NOT_ALLOWED = "PaymentNotAllowed", // This device is not allowed to make the payment + PLAY_STORE_ERROR = "PlayStoreError", // There was an issue with the Play Store service + PRIVACY_ACKNOWLEDGEMENT_REQUIRED = "PrivacyAcknowledgementRequired", // User needs to acknowledge Apple's privacy policy + PRODUCT_ALREADY_OWNED = "ProductAlreadyOwned", // Failed to purchase since item is already owned + PRODUCT_NOT_FOUND = "ProductNotFound", // Failed to purchase since the Qonversion product was not found + PRODUCT_NOT_OWNED = "ProductNotOwned", // Failed to consume purchase since item is not owned + PROJECT_CONFIG_ERROR = "ProjectConfigError", // The project is not configured or configured incorrectly in the Qonversion Dashboard + PURCHASE_CANCELED = "PurchaseCanceled", // User pressed back or canceled a dialog for purchase + PURCHASE_INVALID = "PurchaseInvalid", // Failure of purchase + PURCHASE_PENDING = "PurchasePending", // Purchase is pending + PURCHASE_UNSPECIFIED = "PurchaseUnspecified", // Unspecified state of the purchase + RECEIPT_VALIDATION_ERROR = "ReceiptValidationError", // Receipt validation error + REMOTE_CONFIGURATION_NOT_AVAILABLE = "RemoteConfigurationNotAvailable", // Remote configuration is not available for the current user or for the provided context key + RESPONSE_PARSING_FAILED = "ResponseParsingFailed", // A problem occurred while serializing or deserializing data + STORE_PRODUCT_NOT_AVAILABLE = "StoreProductNotAvailable", // Requested product is not available for purchase or its product id was not found + UNAUTHORIZED_REQUEST_DATA = "UnauthorizedRequestData", // App is attempting to use SKPayment's requestData property, but does not have the appropriate entitlement + UNKNOWN_CLIENT_PLATFORM = "UnknownClientPlatform", // The current platform is not supported } From 9936bb68fb01a8497f3d1bdf97fb04cbccffbab8 Mon Sep 17 00:00:00 2001 From: Surik Date: Mon, 8 Jul 2024 21:23:04 +0400 Subject: [PATCH 5/6] Added fallbacks support --- android/build.gradle | 2 +- .../com/reactlibrary/QonversionModule.java | 5 + .../src/main/assets/qonversion_fallbacks.json | 230 +++++++++ example/android/gradle.properties | 2 +- example/ios/Podfile | 14 + example/ios/Podfile.lock | 463 +++++++++--------- example/ios/example.xcodeproj/project.pbxproj | 154 +++--- example/ios/qonversion_fallbacks.json | 159 ++++++ example/package.json | 2 +- example/yarn.lock | 122 ++--- react-native-qonversion.podspec | 2 +- src/QonversionApi.ts | 6 + src/internal/QonversionInternal.ts | 8 +- 13 files changed, 786 insertions(+), 383 deletions(-) create mode 100644 example/android/app/src/main/assets/qonversion_fallbacks.json create mode 100644 example/ios/qonversion_fallbacks.json diff --git a/android/build.gradle b/android/build.gradle index 50f8099..e71debb 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -65,7 +65,7 @@ repositories { dependencies { //noinspection GradleDynamicVersion implementation 'com.facebook.react:react-native:+' // From node_modules - implementation "io.qonversion.sandwich:sandwich:4.5.0" + implementation "io.qonversion.sandwich:sandwich:5.0.2" } afterEvaluate { project -> diff --git a/android/src/main/java/com/reactlibrary/QonversionModule.java b/android/src/main/java/com/reactlibrary/QonversionModule.java index 235f145..74b8246 100644 --- a/android/src/main/java/com/reactlibrary/QonversionModule.java +++ b/android/src/main/java/com/reactlibrary/QonversionModule.java @@ -211,6 +211,11 @@ public void detachUserFromRemoteConfiguration(final String remoteConfigurationId qonversionSandwich.detachUserFromRemoteConfiguration(remoteConfigurationId, Utils.getResultListener(promise)); } + @ReactMethod + public void isFallbackFileAccessible(final Promise promise) { + qonversionSandwich.isFallbackFileAccessible(Utils.getResultListener(promise)); + } + @Override public void onEntitlementsUpdated(@NonNull Map map) { final WritableMap payload = EntitiesConverter.convertMapToWritableMap(map); diff --git a/example/android/app/src/main/assets/qonversion_fallbacks.json b/example/android/app/src/main/assets/qonversion_fallbacks.json new file mode 100644 index 0000000..8271c30 --- /dev/null +++ b/example/android/app/src/main/assets/qonversion_fallbacks.json @@ -0,0 +1,230 @@ +{ + "products": [ + { + "id": "android_installment", + "duration": 1, + "store_id": "gb7_test_subscription", + "type": 1, + "base_plan_id": "monthly-installment" + }, + { + "id": "android_prepaid_2", + "duration": null, + "store_id": "daniel_prepaid", + "type": 1, + "base_plan_id": "monthly" + }, + { + "id": "dan_test", + "duration": null, + "store_id": "dan_test_annual", + "type": null + }, + { + "id": "gb6_annual", + "duration": 4, + "store_id": "gb6_test", + "type": 0, + "base_plan_id": "annual" + }, + { + "id": "gb6_monthly", + "duration": 1, + "store_id": "gb6_test", + "type": 0, + "base_plan_id": "monthly" + }, + { + "id": "gb6_weekly", + "duration": 0, + "store_id": "gb6_test", + "type": 1, + "base_plan_id": "weekly" + }, + { + "id": "android_prepaid", + "duration": 2, + "store_id": "gp5_test_subscription_4", + "type": 1, + "base_plan_id": "prepaid-3m" + }, + { + "id": "weekly", + "duration": 0, + "store_id": "gp5_test_subscription_4", + "type": 1, + "base_plan_id": "monthly-2" + }, + { + "id": "consumable", + "duration": null, + "store_id": "qonversion_inapp_sample", + "type": 2 + }, + { + "id": "subs_plus_trial", + "duration": 1, + "store_id": "gp5_test_subscription_4", + "type": 0 + }, + { + "id": "annual", + "duration": 4, + "store_id": "article_test_trial", + "type": 0 + }, + { + "id": "in_app", + "duration": null, + "store_id": "qonversion_sample_purchase", + "type": 2 + } + ], + "offerings": [ + { + "id": "main", + "tag": 1, + "products": [ + { + "id": "weekly", + "duration": 0, + "store_id": "gp5_test_subscription_4", + "type": 1, + "base_plan_id": "monthly-2" + }, + { + "id": "annual", + "duration": 4, + "store_id": "article_test_trial", + "type": 0 + }, + { + "id": "consumable", + "duration": null, + "store_id": "qonversion_inapp_sample", + "type": 2 + } + ] + }, + { + "id": "discounted_offer", + "tag": 0, + "products": [] + } + ], + "products_permissions": { + "android_installment": [ + "standart" + ], + "android_prepaid_2": [ + "premium" + ], + "dan_test": [ + "test_permission" + ], + "gb6_annual": [ + "premium" + ], + "gb6_monthly": [ + "plus" + ], + "gb6_weekly": [ + "standart" + ], + "android_prepaid": [ + "premium" + ], + "weekly": [ + "plus" + ], + "consumable": [], + "subs_plus_trial": [ + "standart" + ], + "annual": [ + "standart", + "sample" + ], + "in_app": [ + "Premium Movies" + ] + }, + "remote_config_list": [ + { + "experiment": null, + "payload": { + "CTA": "Start Trial", + "CTA_color": "#307BF6", + "main_image": "[IMAGE_URL]", + "product_id": "prod_7d_trial_5.99", + "show_close_button": true + }, + "source": { + "assignment_type": "auto", + "context_key": "main_paywall", + "name": "default paywall", + "type": "remote_configuration", + "uid": "0dcb1bd9-9bc3-4668-84aa-4540d1042c5d" + } + }, + { + "experiment": null, + "payload": { + "CTA": "Start you trial", + "CTA_color": "red", + "main_image": "111", + "product_id": "123123123123123", + "show_close_button": true + }, + "source": { + "assignment_type": "auto", + "context_key": "trulala", + "name": "Default settings", + "type": "remote_configuration", + "uid": "12feb1dd-8096-47bc-a5a1-443fd2828ecc" + } + }, + { + "experiment": null, + "payload": { + "test_key": "test_value" + }, + "source": { + "assignment_type": "auto", + "context_key": "test_context_key", + "name": "Test with context key1", + "type": "remote_configuration", + "uid": "c5077ec4-acf4-41ea-8b43-05114be5d7ce" + } + }, + { + "experiment": null, + "payload": { + "test_key_2": "test_value_2" + }, + "source": { + "assignment_type": "auto", + "context_key": "test_context_key_2", + "name": "Test with context key2 - copy", + "type": "remote_configuration", + "uid": "1c000f2a-2f4b-4736-b5dd-75b13bf73deb" + } + }, + { + "experiment": null, + "payload": { + "bool": true, + "json": { + "key": "value" + } + }, + "source": { + "assignment_type": "auto", + "context_key": "swift_key ", + "name": "Swift", + "type": "remote_configuration", + "uid": "9f85d738-56d8-4f6c-b54a-c08658be2cb4" + } + } + ] +} \ No newline at end of file diff --git a/example/android/gradle.properties b/example/android/gradle.properties index c48495c..7165b61 100644 --- a/example/android/gradle.properties +++ b/example/android/gradle.properties @@ -25,5 +25,5 @@ android.useAndroidX=true android.enableJetifier=true # Version of flipper SDK to use with React Native -FLIPPER_VERSION=0.74.0 +FLIPPER_VERSION=0.125.0 org.gradle.jvmargs=-Xmx4608m diff --git a/example/ios/Podfile b/example/ios/Podfile index b2afd34..633db9c 100644 --- a/example/ios/Podfile +++ b/example/ios/Podfile @@ -33,6 +33,7 @@ target 'example' do pod 'RCT-Folly', :podspec => '../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec', :modular_headers => false pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec', :modular_headers => false + pod 'fmt', :modular_headers => false post_install do |installer| react_native_post_install( @@ -42,6 +43,19 @@ target 'example' do :mac_catalyst_enabled => false ) __apply_Xcode_12_5_M1_post_install_workaround(installer) + + installer.pods_project.targets.each do |target| + if target.name == 'Flipper' + file_path = 'Pods/Flipper/xplat/Flipper/FlipperTransportTypes.h' + contents = File.read(file_path) + unless contents.include?('#include ') + File.open(file_path, 'w') do |file| + file.puts('#include ') + file.puts(contents) + end + end + end + end end end diff --git a/example/ios/Podfile.lock b/example/ios/Podfile.lock index 3db8161..ac09382 100644 --- a/example/ios/Podfile.lock +++ b/example/ios/Podfile.lock @@ -2,14 +2,14 @@ PODS: - boost (1.76.0) - CocoaAsyncSocket (7.6.5) - DoubleConversion (1.1.6) - - FBLazyVector (0.70.5) - - FBReactNativeSpec (0.70.5): + - FBLazyVector (0.70.7) + - FBReactNativeSpec (0.70.7): - RCT-Folly (= 2021.07.22.00) - - RCTRequired (= 0.70.5) - - RCTTypeSafety (= 0.70.5) - - React-Core (= 0.70.5) - - React-jsi (= 0.70.5) - - ReactCommon/turbomodule/core (= 0.70.5) + - RCTRequired (= 0.70.7) + - RCTTypeSafety (= 0.70.7) + - React-Core (= 0.70.7) + - React-jsi (= 0.70.7) + - ReactCommon/turbomodule/core (= 0.70.7) - Flipper (0.125.0): - Flipper-Folly (~> 2.6) - Flipper-RSocket (~> 1.4) @@ -75,11 +75,11 @@ PODS: - glog (0.3.5) - libevent (2.1.12) - OpenSSL-Universal (1.1.1100) - - Qonversion (5.10.0): - - Qonversion/Main (= 5.10.0) - - Qonversion/Main (5.10.0) - - QonversionSandwich (4.5.0): - - Qonversion (= 5.10.0) + - Qonversion (5.11.0): + - Qonversion/Main (= 5.11.0) + - Qonversion/Main (5.11.0) + - QonversionSandwich (5.0.2): + - Qonversion (= 5.11.0) - RCT-Folly (2021.07.22.00): - boost - DoubleConversion @@ -91,273 +91,273 @@ PODS: - DoubleConversion - fmt (~> 6.2.1) - glog - - RCTRequired (0.70.5) - - RCTTypeSafety (0.70.5): - - FBLazyVector (= 0.70.5) - - RCTRequired (= 0.70.5) - - React-Core (= 0.70.5) - - React (0.70.5): - - React-Core (= 0.70.5) - - React-Core/DevSupport (= 0.70.5) - - React-Core/RCTWebSocket (= 0.70.5) - - React-RCTActionSheet (= 0.70.5) - - React-RCTAnimation (= 0.70.5) - - React-RCTBlob (= 0.70.5) - - React-RCTImage (= 0.70.5) - - React-RCTLinking (= 0.70.5) - - React-RCTNetwork (= 0.70.5) - - React-RCTSettings (= 0.70.5) - - React-RCTText (= 0.70.5) - - React-RCTVibration (= 0.70.5) - - React-bridging (0.70.5): + - RCTRequired (0.70.7) + - RCTTypeSafety (0.70.7): + - FBLazyVector (= 0.70.7) + - RCTRequired (= 0.70.7) + - React-Core (= 0.70.7) + - React (0.70.7): + - React-Core (= 0.70.7) + - React-Core/DevSupport (= 0.70.7) + - React-Core/RCTWebSocket (= 0.70.7) + - React-RCTActionSheet (= 0.70.7) + - React-RCTAnimation (= 0.70.7) + - React-RCTBlob (= 0.70.7) + - React-RCTImage (= 0.70.7) + - React-RCTLinking (= 0.70.7) + - React-RCTNetwork (= 0.70.7) + - React-RCTSettings (= 0.70.7) + - React-RCTText (= 0.70.7) + - React-RCTVibration (= 0.70.7) + - React-bridging (0.70.7): - RCT-Folly (= 2021.07.22.00) - - React-jsi (= 0.70.5) - - React-callinvoker (0.70.5) - - React-Codegen (0.70.5): - - FBReactNativeSpec (= 0.70.5) + - React-jsi (= 0.70.7) + - React-callinvoker (0.70.7) + - React-Codegen (0.70.7): + - FBReactNativeSpec (= 0.70.7) - RCT-Folly (= 2021.07.22.00) - - RCTRequired (= 0.70.5) - - RCTTypeSafety (= 0.70.5) - - React-Core (= 0.70.5) - - React-jsi (= 0.70.5) - - React-jsiexecutor (= 0.70.5) - - ReactCommon/turbomodule/core (= 0.70.5) - - React-Core (0.70.5): + - RCTRequired (= 0.70.7) + - RCTTypeSafety (= 0.70.7) + - React-Core (= 0.70.7) + - React-jsi (= 0.70.7) + - React-jsiexecutor (= 0.70.7) + - ReactCommon/turbomodule/core (= 0.70.7) + - React-Core (0.70.7): - glog - RCT-Folly (= 2021.07.22.00) - - React-Core/Default (= 0.70.5) - - React-cxxreact (= 0.70.5) - - React-jsi (= 0.70.5) - - React-jsiexecutor (= 0.70.5) - - React-perflogger (= 0.70.5) + - React-Core/Default (= 0.70.7) + - React-cxxreact (= 0.70.7) + - React-jsi (= 0.70.7) + - React-jsiexecutor (= 0.70.7) + - React-perflogger (= 0.70.7) - Yoga - - React-Core/CoreModulesHeaders (0.70.5): + - React-Core/CoreModulesHeaders (0.70.7): - glog - RCT-Folly (= 2021.07.22.00) - React-Core/Default - - React-cxxreact (= 0.70.5) - - React-jsi (= 0.70.5) - - React-jsiexecutor (= 0.70.5) - - React-perflogger (= 0.70.5) + - React-cxxreact (= 0.70.7) + - React-jsi (= 0.70.7) + - React-jsiexecutor (= 0.70.7) + - React-perflogger (= 0.70.7) - Yoga - - React-Core/Default (0.70.5): + - React-Core/Default (0.70.7): - glog - RCT-Folly (= 2021.07.22.00) - - React-cxxreact (= 0.70.5) - - React-jsi (= 0.70.5) - - React-jsiexecutor (= 0.70.5) - - React-perflogger (= 0.70.5) + - React-cxxreact (= 0.70.7) + - React-jsi (= 0.70.7) + - React-jsiexecutor (= 0.70.7) + - React-perflogger (= 0.70.7) - Yoga - - React-Core/DevSupport (0.70.5): + - React-Core/DevSupport (0.70.7): - glog - RCT-Folly (= 2021.07.22.00) - - React-Core/Default (= 0.70.5) - - React-Core/RCTWebSocket (= 0.70.5) - - React-cxxreact (= 0.70.5) - - React-jsi (= 0.70.5) - - React-jsiexecutor (= 0.70.5) - - React-jsinspector (= 0.70.5) - - React-perflogger (= 0.70.5) + - React-Core/Default (= 0.70.7) + - React-Core/RCTWebSocket (= 0.70.7) + - React-cxxreact (= 0.70.7) + - React-jsi (= 0.70.7) + - React-jsiexecutor (= 0.70.7) + - React-jsinspector (= 0.70.7) + - React-perflogger (= 0.70.7) - Yoga - - React-Core/RCTActionSheetHeaders (0.70.5): + - React-Core/RCTActionSheetHeaders (0.70.7): - glog - RCT-Folly (= 2021.07.22.00) - React-Core/Default - - React-cxxreact (= 0.70.5) - - React-jsi (= 0.70.5) - - React-jsiexecutor (= 0.70.5) - - React-perflogger (= 0.70.5) + - React-cxxreact (= 0.70.7) + - React-jsi (= 0.70.7) + - React-jsiexecutor (= 0.70.7) + - React-perflogger (= 0.70.7) - Yoga - - React-Core/RCTAnimationHeaders (0.70.5): + - React-Core/RCTAnimationHeaders (0.70.7): - glog - RCT-Folly (= 2021.07.22.00) - React-Core/Default - - React-cxxreact (= 0.70.5) - - React-jsi (= 0.70.5) - - React-jsiexecutor (= 0.70.5) - - React-perflogger (= 0.70.5) + - React-cxxreact (= 0.70.7) + - React-jsi (= 0.70.7) + - React-jsiexecutor (= 0.70.7) + - React-perflogger (= 0.70.7) - Yoga - - React-Core/RCTBlobHeaders (0.70.5): + - React-Core/RCTBlobHeaders (0.70.7): - glog - RCT-Folly (= 2021.07.22.00) - React-Core/Default - - React-cxxreact (= 0.70.5) - - React-jsi (= 0.70.5) - - React-jsiexecutor (= 0.70.5) - - React-perflogger (= 0.70.5) + - React-cxxreact (= 0.70.7) + - React-jsi (= 0.70.7) + - React-jsiexecutor (= 0.70.7) + - React-perflogger (= 0.70.7) - Yoga - - React-Core/RCTImageHeaders (0.70.5): + - React-Core/RCTImageHeaders (0.70.7): - glog - RCT-Folly (= 2021.07.22.00) - React-Core/Default - - React-cxxreact (= 0.70.5) - - React-jsi (= 0.70.5) - - React-jsiexecutor (= 0.70.5) - - React-perflogger (= 0.70.5) + - React-cxxreact (= 0.70.7) + - React-jsi (= 0.70.7) + - React-jsiexecutor (= 0.70.7) + - React-perflogger (= 0.70.7) - Yoga - - React-Core/RCTLinkingHeaders (0.70.5): + - React-Core/RCTLinkingHeaders (0.70.7): - glog - RCT-Folly (= 2021.07.22.00) - React-Core/Default - - React-cxxreact (= 0.70.5) - - React-jsi (= 0.70.5) - - React-jsiexecutor (= 0.70.5) - - React-perflogger (= 0.70.5) + - React-cxxreact (= 0.70.7) + - React-jsi (= 0.70.7) + - React-jsiexecutor (= 0.70.7) + - React-perflogger (= 0.70.7) - Yoga - - React-Core/RCTNetworkHeaders (0.70.5): + - React-Core/RCTNetworkHeaders (0.70.7): - glog - RCT-Folly (= 2021.07.22.00) - React-Core/Default - - React-cxxreact (= 0.70.5) - - React-jsi (= 0.70.5) - - React-jsiexecutor (= 0.70.5) - - React-perflogger (= 0.70.5) + - React-cxxreact (= 0.70.7) + - React-jsi (= 0.70.7) + - React-jsiexecutor (= 0.70.7) + - React-perflogger (= 0.70.7) - Yoga - - React-Core/RCTSettingsHeaders (0.70.5): + - React-Core/RCTSettingsHeaders (0.70.7): - glog - RCT-Folly (= 2021.07.22.00) - React-Core/Default - - React-cxxreact (= 0.70.5) - - React-jsi (= 0.70.5) - - React-jsiexecutor (= 0.70.5) - - React-perflogger (= 0.70.5) + - React-cxxreact (= 0.70.7) + - React-jsi (= 0.70.7) + - React-jsiexecutor (= 0.70.7) + - React-perflogger (= 0.70.7) - Yoga - - React-Core/RCTTextHeaders (0.70.5): + - React-Core/RCTTextHeaders (0.70.7): - glog - RCT-Folly (= 2021.07.22.00) - React-Core/Default - - React-cxxreact (= 0.70.5) - - React-jsi (= 0.70.5) - - React-jsiexecutor (= 0.70.5) - - React-perflogger (= 0.70.5) + - React-cxxreact (= 0.70.7) + - React-jsi (= 0.70.7) + - React-jsiexecutor (= 0.70.7) + - React-perflogger (= 0.70.7) - Yoga - - React-Core/RCTVibrationHeaders (0.70.5): + - React-Core/RCTVibrationHeaders (0.70.7): - glog - RCT-Folly (= 2021.07.22.00) - React-Core/Default - - React-cxxreact (= 0.70.5) - - React-jsi (= 0.70.5) - - React-jsiexecutor (= 0.70.5) - - React-perflogger (= 0.70.5) + - React-cxxreact (= 0.70.7) + - React-jsi (= 0.70.7) + - React-jsiexecutor (= 0.70.7) + - React-perflogger (= 0.70.7) - Yoga - - React-Core/RCTWebSocket (0.70.5): + - React-Core/RCTWebSocket (0.70.7): - glog - RCT-Folly (= 2021.07.22.00) - - React-Core/Default (= 0.70.5) - - React-cxxreact (= 0.70.5) - - React-jsi (= 0.70.5) - - React-jsiexecutor (= 0.70.5) - - React-perflogger (= 0.70.5) + - React-Core/Default (= 0.70.7) + - React-cxxreact (= 0.70.7) + - React-jsi (= 0.70.7) + - React-jsiexecutor (= 0.70.7) + - React-perflogger (= 0.70.7) - Yoga - - React-CoreModules (0.70.5): + - React-CoreModules (0.70.7): - RCT-Folly (= 2021.07.22.00) - - RCTTypeSafety (= 0.70.5) - - React-Codegen (= 0.70.5) - - React-Core/CoreModulesHeaders (= 0.70.5) - - React-jsi (= 0.70.5) - - React-RCTImage (= 0.70.5) - - ReactCommon/turbomodule/core (= 0.70.5) - - React-cxxreact (0.70.5): + - RCTTypeSafety (= 0.70.7) + - React-Codegen (= 0.70.7) + - React-Core/CoreModulesHeaders (= 0.70.7) + - React-jsi (= 0.70.7) + - React-RCTImage (= 0.70.7) + - ReactCommon/turbomodule/core (= 0.70.7) + - React-cxxreact (0.70.7): - boost (= 1.76.0) - DoubleConversion - glog - RCT-Folly (= 2021.07.22.00) - - React-callinvoker (= 0.70.5) - - React-jsi (= 0.70.5) - - React-jsinspector (= 0.70.5) - - React-logger (= 0.70.5) - - React-perflogger (= 0.70.5) - - React-runtimeexecutor (= 0.70.5) - - React-jsi (0.70.5): + - React-callinvoker (= 0.70.7) + - React-jsi (= 0.70.7) + - React-jsinspector (= 0.70.7) + - React-logger (= 0.70.7) + - React-perflogger (= 0.70.7) + - React-runtimeexecutor (= 0.70.7) + - React-jsi (0.70.7): - boost (= 1.76.0) - DoubleConversion - glog - RCT-Folly (= 2021.07.22.00) - - React-jsi/Default (= 0.70.5) - - React-jsi/Default (0.70.5): + - React-jsi/Default (= 0.70.7) + - React-jsi/Default (0.70.7): - boost (= 1.76.0) - DoubleConversion - glog - RCT-Folly (= 2021.07.22.00) - - React-jsiexecutor (0.70.5): + - React-jsiexecutor (0.70.7): - DoubleConversion - glog - RCT-Folly (= 2021.07.22.00) - - React-cxxreact (= 0.70.5) - - React-jsi (= 0.70.5) - - React-perflogger (= 0.70.5) - - React-jsinspector (0.70.5) - - React-logger (0.70.5): + - React-cxxreact (= 0.70.7) + - React-jsi (= 0.70.7) + - React-perflogger (= 0.70.7) + - React-jsinspector (0.70.7) + - React-logger (0.70.7): - glog - - react-native-qonversion (7.5.0): - - QonversionSandwich (= 4.5.0) + - react-native-qonversion (8.0.0): + - QonversionSandwich (= 5.0.2) - React - - React-perflogger (0.70.5) - - React-RCTActionSheet (0.70.5): - - React-Core/RCTActionSheetHeaders (= 0.70.5) - - React-RCTAnimation (0.70.5): + - React-perflogger (0.70.7) + - React-RCTActionSheet (0.70.7): + - React-Core/RCTActionSheetHeaders (= 0.70.7) + - React-RCTAnimation (0.70.7): - RCT-Folly (= 2021.07.22.00) - - RCTTypeSafety (= 0.70.5) - - React-Codegen (= 0.70.5) - - React-Core/RCTAnimationHeaders (= 0.70.5) - - React-jsi (= 0.70.5) - - ReactCommon/turbomodule/core (= 0.70.5) - - React-RCTBlob (0.70.5): + - RCTTypeSafety (= 0.70.7) + - React-Codegen (= 0.70.7) + - React-Core/RCTAnimationHeaders (= 0.70.7) + - React-jsi (= 0.70.7) + - ReactCommon/turbomodule/core (= 0.70.7) + - React-RCTBlob (0.70.7): - RCT-Folly (= 2021.07.22.00) - - React-Codegen (= 0.70.5) - - React-Core/RCTBlobHeaders (= 0.70.5) - - React-Core/RCTWebSocket (= 0.70.5) - - React-jsi (= 0.70.5) - - React-RCTNetwork (= 0.70.5) - - ReactCommon/turbomodule/core (= 0.70.5) - - React-RCTImage (0.70.5): + - React-Codegen (= 0.70.7) + - React-Core/RCTBlobHeaders (= 0.70.7) + - React-Core/RCTWebSocket (= 0.70.7) + - React-jsi (= 0.70.7) + - React-RCTNetwork (= 0.70.7) + - ReactCommon/turbomodule/core (= 0.70.7) + - React-RCTImage (0.70.7): - RCT-Folly (= 2021.07.22.00) - - RCTTypeSafety (= 0.70.5) - - React-Codegen (= 0.70.5) - - React-Core/RCTImageHeaders (= 0.70.5) - - React-jsi (= 0.70.5) - - React-RCTNetwork (= 0.70.5) - - ReactCommon/turbomodule/core (= 0.70.5) - - React-RCTLinking (0.70.5): - - React-Codegen (= 0.70.5) - - React-Core/RCTLinkingHeaders (= 0.70.5) - - React-jsi (= 0.70.5) - - ReactCommon/turbomodule/core (= 0.70.5) - - React-RCTNetwork (0.70.5): + - RCTTypeSafety (= 0.70.7) + - React-Codegen (= 0.70.7) + - React-Core/RCTImageHeaders (= 0.70.7) + - React-jsi (= 0.70.7) + - React-RCTNetwork (= 0.70.7) + - ReactCommon/turbomodule/core (= 0.70.7) + - React-RCTLinking (0.70.7): + - React-Codegen (= 0.70.7) + - React-Core/RCTLinkingHeaders (= 0.70.7) + - React-jsi (= 0.70.7) + - ReactCommon/turbomodule/core (= 0.70.7) + - React-RCTNetwork (0.70.7): - RCT-Folly (= 2021.07.22.00) - - RCTTypeSafety (= 0.70.5) - - React-Codegen (= 0.70.5) - - React-Core/RCTNetworkHeaders (= 0.70.5) - - React-jsi (= 0.70.5) - - ReactCommon/turbomodule/core (= 0.70.5) - - React-RCTSettings (0.70.5): + - RCTTypeSafety (= 0.70.7) + - React-Codegen (= 0.70.7) + - React-Core/RCTNetworkHeaders (= 0.70.7) + - React-jsi (= 0.70.7) + - ReactCommon/turbomodule/core (= 0.70.7) + - React-RCTSettings (0.70.7): - RCT-Folly (= 2021.07.22.00) - - RCTTypeSafety (= 0.70.5) - - React-Codegen (= 0.70.5) - - React-Core/RCTSettingsHeaders (= 0.70.5) - - React-jsi (= 0.70.5) - - ReactCommon/turbomodule/core (= 0.70.5) - - React-RCTText (0.70.5): - - React-Core/RCTTextHeaders (= 0.70.5) - - React-RCTVibration (0.70.5): + - RCTTypeSafety (= 0.70.7) + - React-Codegen (= 0.70.7) + - React-Core/RCTSettingsHeaders (= 0.70.7) + - React-jsi (= 0.70.7) + - ReactCommon/turbomodule/core (= 0.70.7) + - React-RCTText (0.70.7): + - React-Core/RCTTextHeaders (= 0.70.7) + - React-RCTVibration (0.70.7): - RCT-Folly (= 2021.07.22.00) - - React-Codegen (= 0.70.5) - - React-Core/RCTVibrationHeaders (= 0.70.5) - - React-jsi (= 0.70.5) - - ReactCommon/turbomodule/core (= 0.70.5) - - React-runtimeexecutor (0.70.5): - - React-jsi (= 0.70.5) - - ReactCommon/turbomodule/core (0.70.5): + - React-Codegen (= 0.70.7) + - React-Core/RCTVibrationHeaders (= 0.70.7) + - React-jsi (= 0.70.7) + - ReactCommon/turbomodule/core (= 0.70.7) + - React-runtimeexecutor (0.70.7): + - React-jsi (= 0.70.7) + - ReactCommon/turbomodule/core (0.70.7): - DoubleConversion - glog - RCT-Folly (= 2021.07.22.00) - - React-bridging (= 0.70.5) - - React-callinvoker (= 0.70.5) - - React-Core (= 0.70.5) - - React-cxxreact (= 0.70.5) - - React-jsi (= 0.70.5) - - React-logger (= 0.70.5) - - React-perflogger (= 0.70.5) + - React-bridging (= 0.70.7) + - React-callinvoker (= 0.70.7) + - React-Core (= 0.70.7) + - React-cxxreact (= 0.70.7) + - React-jsi (= 0.70.7) + - React-logger (= 0.70.7) + - React-perflogger (= 0.70.7) - RNCPushNotificationIOS (1.10.1): - React-Core - SocketRocket (0.6.1) @@ -391,6 +391,7 @@ DEPENDENCIES: - FlipperKit/FlipperKitReactPlugin (= 0.125.0) - FlipperKit/FlipperKitUserDefaultsPlugin (= 0.125.0) - FlipperKit/SKIOSNetworkPlugin (= 0.125.0) + - fmt - glog (from `../node_modules/react-native/third-party-podspecs/glog.podspec`) - OpenSSL-Universal (= 1.1.1100) - RCT-Folly (from `../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec`) @@ -519,8 +520,8 @@ SPEC CHECKSUMS: boost: a7c83b31436843459a1961bfd74b96033dc77234 CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99 DoubleConversion: 5189b271737e1565bdce30deb4a08d647e3f5f54 - FBLazyVector: affa4ba1bfdaac110a789192f4d452b053a86624 - FBReactNativeSpec: fe8b5f1429cfe83a8d72dc8ed61dc7704cac8745 + FBLazyVector: a6454570f573a0f6f1d397e5a95c13e8e45d1700 + FBReactNativeSpec: 09e8dfba44487e5dc4882a9f5318cde67549549c Flipper: 26fc4b7382499f1281eb8cb921e5c3ad6de91fe0 Flipper-Boost-iOSX: fd1e2b8cbef7e662a122412d7ac5f5bea715403c Flipper-DoubleConversion: 2dc99b02f658daf147069aad9dbd29d8feb06d30 @@ -534,40 +535,40 @@ SPEC CHECKSUMS: glog: 04b94705f318337d7ead9e6d17c019bd9b1f6b1b libevent: 4049cae6c81cdb3654a443be001fb9bdceff7913 OpenSSL-Universal: ebc357f1e6bc71fa463ccb2fe676756aff50e88c - Qonversion: 879e542136f238e963d5488ef31983f28bd315ef - QonversionSandwich: 40d9bb9065d0cc693b959552ad053e3d4bfc1a33 + Qonversion: b39cb723b933c6e18bd9e03c763b366385906d83 + QonversionSandwich: dbaec81051fe172857e008c5fc6e8d2f9bc1642f RCT-Folly: 0080d0a6ebf2577475bda044aa59e2ca1f909cda - RCTRequired: 21229f84411088e5d8538f21212de49e46cc83e2 - RCTTypeSafety: 62eed57a32924b09edaaf170a548d1fc96223086 - React: f0254ccddeeef1defe66c6b1bb9133a4f040792b - React-bridging: e46911666b7ec19538a620a221d6396cd293d687 - React-callinvoker: 66b62e2c34546546b2f21ab0b7670346410a2b53 - React-Codegen: b6999435966df3bdf82afa3f319ba0d6f9a8532a - React-Core: dabbc9d1fe0a11d884e6ee1599789cf8eb1058a5 - React-CoreModules: 5b6b7668f156f73a56420df9ec68ca2ec8f2e818 - React-cxxreact: c7ca2baee46db22a30fce9e639277add3c3f6ad1 - React-jsi: a565dcb49130ed20877a9bb1105ffeecbb93d02d - React-jsiexecutor: 31564fa6912459921568e8b0e49024285a4d584b - React-jsinspector: badd81696361249893a80477983e697aab3c1a34 - React-logger: fdda34dd285bdb0232e059b19d9606fa0ec3bb9c - react-native-qonversion: 523674221e73b04388467c3abead911d1a414577 - React-perflogger: e68d3795cf5d247a0379735cbac7309adf2fb931 - React-RCTActionSheet: 05452c3b281edb27850253db13ecd4c5a65bc247 - React-RCTAnimation: 578eebac706428e68466118e84aeacf3a282b4da - React-RCTBlob: f47a0aa61e7d1fb1a0e13da832b0da934939d71a - React-RCTImage: 60f54b66eed65d86b6dffaf4733d09161d44929d - React-RCTLinking: 91073205aeec4b29450ca79b709277319368ac9e - React-RCTNetwork: ca91f2c9465a7e335c8a5fae731fd7f10572213b - React-RCTSettings: 1a9a5d01337d55c18168c1abe0f4a589167d134a - React-RCTText: c591e8bd9347a294d8416357ca12d779afec01d5 - React-RCTVibration: 8e5c8c5d17af641f306d7380d8d0fe9b3c142c48 - React-runtimeexecutor: 7401c4a40f8728fd89df4a56104541b760876117 - ReactCommon: c9246996e73bf75a2c6c3ff15f1e16707cdc2da9 + RCTRequired: 837880d26ec119e105317dc28a456f3016bf16d1 + RCTTypeSafety: 5c854c04c3383cab04f404e25d408ed52124b300 + React: ec6efc54c0fbb7c2e7147624c78065be80753082 + React-bridging: 7dd96a58f896a1a7422a491d17ec644e87277953 + React-callinvoker: f348d204f7bbe6020d4fd0dd57303f5b48a28003 + React-Codegen: 73350192a09163a640c23baf795464474be0d793 + React-Core: c57b11fd672421049038ef36881372da2605a0cd + React-CoreModules: 2d91acffc3924adac6b508e3fc44121aa719ec40 + React-cxxreact: ee2ab13a1db086dc152421aa42dc94cc68f412a1 + React-jsi: 04031a830f9714e95d517153817ba7bfc15bfdf8 + React-jsiexecutor: e95cdd036e7947ddf87f3049319ac3064deb76b5 + React-jsinspector: 1c34fea1868136ecde647bc11fae9266d4143693 + React-logger: e9f407f9fdf3f3ce7749ae6f88affe63e8446019 + react-native-qonversion: f274a7b0c9af02bb9f77b6d1a2e6a1f9fce22b24 + React-perflogger: 52a94f38c19a518d05726624b49bfc192639374d + React-RCTActionSheet: 7b89fe64a852bc3ae39b91dbd142ef09931ef3f7 + React-RCTAnimation: ad84bfbf8c5f6f77e65092d0c2b0506b80b5cf99 + React-RCTBlob: e4ee3ab649459329f5aa59d903762bfbd6164220 + React-RCTImage: aeb508f6ac80a94904a646dde61b0f67ea757ea7 + React-RCTLinking: 1171b3fdc265c479b7039069ce7e8fef68ca70aa + React-RCTNetwork: 5d87cc4afd1fcef86fb2f804f26366f0314769fe + React-RCTSettings: 644545854880b7d03c49f620664a307fd4613a1d + React-RCTText: f8e4a283be2290a76b89f4a83ba2277faf90930d + React-RCTVibration: eb7837d55b87c7a4ead3ab7632ad70dca87c65dc + React-runtimeexecutor: 7cec9ed92ebde8309902530bb566819645c84ee5 + ReactCommon: 0253d197eaa7f6689dcd3e7d5360449ab93e10df RNCPushNotificationIOS: 87b8d16d3ede4532745e05b03c42cff33a36cc45 SocketRocket: f32cd54efbe0f095c4d7594881e52619cfe80b17 - Yoga: eca980a5771bf114c41a754098cd85e6e0d90ed7 + Yoga: 92d086bb705a41cc588599b51db726ba7b1d341c YogaKit: f782866e155069a2cca2517aafea43200b01fd5a -PODFILE CHECKSUM: 0dce4b7944944a0de16fd6cacc29aa20d6858b4f +PODFILE CHECKSUM: f9772353ed0452b7cd7aaeb49261dbd07dd4af10 -COCOAPODS: 1.13.0 +COCOAPODS: 1.15.2 diff --git a/example/ios/example.xcodeproj/project.pbxproj b/example/ios/example.xcodeproj/project.pbxproj index 0d655f9..dfd2ded 100644 --- a/example/ios/example.xcodeproj/project.pbxproj +++ b/example/ios/example.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 46; + objectVersion = 55; objects = { /* Begin PBXBuildFile section */ @@ -17,6 +17,7 @@ 2D02E4BD1E0B4A84006451C7 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; }; 2D02E4BF1E0B4AB3006451C7 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; }; 2DCD954D1E0B4F2C00145EB5 /* exampleTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* exampleTests.m */; }; + 7000C87F2C2EFD9B00E3CC5A /* qonversion_fallbacks.json in Resources */ = {isa = PBXBuildFile; fileRef = 7000C87E2C2EFD9B00E3CC5A /* qonversion_fallbacks.json */; }; A90D88B639E5B9BE4E5CC169 /* libPods-example-tvOSTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 8A15F8FB406D63FC234399C8 /* libPods-example-tvOSTests.a */; }; E376607E3D831381D69CE332 /* libPods-example-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1551CD4A26CA41534DD33810 /* libPods-example-tvOS.a */; }; EF2EF379DD8CEA3852E93EF7 /* libPods-example-exampleTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1E38E12D1A0FA33D55B2EF4E /* libPods-example-exampleTests.a */; }; @@ -62,6 +63,7 @@ 504F4A05A0695786BFBE7FA6 /* Pods-example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-example.debug.xcconfig"; path = "Target Support Files/Pods-example/Pods-example.debug.xcconfig"; sourceTree = ""; }; 5F01FC8542633FEE1BA15CDA /* Pods-example-tvOSTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-example-tvOSTests.debug.xcconfig"; path = "Target Support Files/Pods-example-tvOSTests/Pods-example-tvOSTests.debug.xcconfig"; sourceTree = ""; }; 6A26A7A527DF87A800281166 /* example.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; name = example.entitlements; path = example/example.entitlements; sourceTree = ""; }; + 7000C87E2C2EFD9B00E3CC5A /* qonversion_fallbacks.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = qonversion_fallbacks.json; sourceTree = ""; }; 8A15F8FB406D63FC234399C8 /* libPods-example-tvOSTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-example-tvOSTests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 8D1EB4B9E4604B002F0905BE /* Pods-example-tvOS.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-example-tvOS.release.xcconfig"; path = "Target Support Files/Pods-example-tvOS/Pods-example-tvOS.release.xcconfig"; sourceTree = ""; }; 91393DDA1A12547852AE38A3 /* Pods-example-exampleTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-example-exampleTests.release.xcconfig"; path = "Target Support Files/Pods-example-exampleTests/Pods-example-exampleTests.release.xcconfig"; sourceTree = ""; }; @@ -127,6 +129,7 @@ 13B07FAE1A68108700A75B9A /* example */ = { isa = PBXGroup; children = ( + 7000C87E2C2EFD9B00E3CC5A /* qonversion_fallbacks.json */, 6A26A7A527DF87A800281166 /* example.entitlements */, 008F07F21AC5B25A0029DE68 /* main.jsbundle */, 13B07FAF1A68108700A75B9A /* AppDelegate.h */, @@ -212,8 +215,8 @@ 00E356EA1AD99517003FC87E /* Sources */, 00E356EB1AD99517003FC87E /* Frameworks */, 00E356EC1AD99517003FC87E /* Resources */, - 7295766C57B1D2A8DAC8D9FD /* [CP] Embed Pods Frameworks */, EDF9F23AECC0E491E56C0957 /* [CP] Copy Pods Resources */, + BD4A224853EE9111B3F00B90 /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); @@ -235,8 +238,8 @@ 13B07F8C1A680F5B00A75B9A /* Frameworks */, 13B07F8E1A680F5B00A75B9A /* Resources */, 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */, - 4BB32E25C54EA0FA0632563F /* [CP] Embed Pods Frameworks */, 8A7D4A9239D1757EBCC104A3 /* [CP] Copy Pods Resources */, + F86B4F852BDDF59C93624640 /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); @@ -314,7 +317,7 @@ }; }; buildConfigurationList = 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "example" */; - compatibilityVersion = "Xcode 3.2"; + compatibilityVersion = "Xcode 13.0"; developmentRegion = en; hasScannedForEncodings = 0; knownRegions = ( @@ -348,6 +351,7 @@ files = ( 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */, 13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */, + 7000C87F2C2EFD9B00E3CC5A /* qonversion_fallbacks.json in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -419,28 +423,6 @@ shellPath = /bin/sh; shellScript = "export NODE_BINARY=node\n../node_modules/react-native/scripts/react-native-xcode.sh"; }; - 4BB32E25C54EA0FA0632563F /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-example/Pods-example-frameworks.sh", - "${PODS_XCFRAMEWORKS_BUILD_DIR}/Flipper-DoubleConversion/double-conversion.framework/double-conversion", - "${PODS_XCFRAMEWORKS_BUILD_DIR}/Flipper-Glog/glog.framework/glog", - "${PODS_XCFRAMEWORKS_BUILD_DIR}/OpenSSL-Universal/OpenSSL.framework/OpenSSL", - ); - name = "[CP] Embed Pods Frameworks"; - outputPaths = ( - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/double-conversion.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/glog.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/OpenSSL.framework", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-example/Pods-example-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; 674BA4F96C2D096E2B4ECCC6 /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; @@ -485,46 +467,38 @@ shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; - 7295766C57B1D2A8DAC8D9FD /* [CP] Embed Pods Frameworks */ = { + 8A7D4A9239D1757EBCC104A3 /* [CP] Copy Pods Resources */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); - inputPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-example-exampleTests/Pods-example-exampleTests-frameworks.sh", - "${PODS_XCFRAMEWORKS_BUILD_DIR}/Flipper-DoubleConversion/double-conversion.framework/double-conversion", - "${PODS_XCFRAMEWORKS_BUILD_DIR}/Flipper-Glog/glog.framework/glog", - "${PODS_XCFRAMEWORKS_BUILD_DIR}/OpenSSL-Universal/OpenSSL.framework/OpenSSL", + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-example/Pods-example-resources-${CONFIGURATION}-input-files.xcfilelist", ); - name = "[CP] Embed Pods Frameworks"; - outputPaths = ( - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/double-conversion.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/glog.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/OpenSSL.framework", + name = "[CP] Copy Pods Resources"; + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-example/Pods-example-resources-${CONFIGURATION}-output-files.xcfilelist", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-example-exampleTests/Pods-example-exampleTests-frameworks.sh\"\n"; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-example/Pods-example-resources.sh\"\n"; showEnvVarsInLog = 0; }; - 8A7D4A9239D1757EBCC104A3 /* [CP] Copy Pods Resources */ = { + BD4A224853EE9111B3F00B90 /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); - inputPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-example/Pods-example-resources.sh", - "${PODS_CONFIGURATION_BUILD_DIR}/Qonversion/Qonversion.bundle", - "${PODS_CONFIGURATION_BUILD_DIR}/React-Core/AccessibilityResources.bundle", + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-example-exampleTests/Pods-example-exampleTests-frameworks-${CONFIGURATION}-input-files.xcfilelist", ); - name = "[CP] Copy Pods Resources"; - outputPaths = ( - "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Qonversion.bundle", - "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/AccessibilityResources.bundle", + name = "[CP] Embed Pods Frameworks"; + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-example-exampleTests/Pods-example-exampleTests-frameworks-${CONFIGURATION}-output-files.xcfilelist", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-example/Pods-example-resources.sh\"\n"; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-example-exampleTests/Pods-example-exampleTests-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; C32B4DF51D9FBEBDC4114C60 /* [CP] Check Pods Manifest.lock */ = { @@ -554,21 +528,35 @@ buildActionMask = 2147483647; files = ( ); - inputPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-example-exampleTests/Pods-example-exampleTests-resources.sh", - "${PODS_CONFIGURATION_BUILD_DIR}/Qonversion/Qonversion.bundle", - "${PODS_CONFIGURATION_BUILD_DIR}/React-Core/AccessibilityResources.bundle", + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-example-exampleTests/Pods-example-exampleTests-resources-${CONFIGURATION}-input-files.xcfilelist", ); name = "[CP] Copy Pods Resources"; - outputPaths = ( - "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Qonversion.bundle", - "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/AccessibilityResources.bundle", + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-example-exampleTests/Pods-example-exampleTests-resources-${CONFIGURATION}-output-files.xcfilelist", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-example-exampleTests/Pods-example-exampleTests-resources.sh\"\n"; showEnvVarsInLog = 0; }; + F86B4F852BDDF59C93624640 /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-example/Pods-example-frameworks-${CONFIGURATION}-input-files.xcfilelist", + ); + name = "[CP] Embed Pods Frameworks"; + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-example/Pods-example-frameworks-${CONFIGURATION}-output-files.xcfilelist", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-example/Pods-example-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; FD10A7F022414F080027D42C /* Start Packager */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; @@ -683,7 +671,11 @@ ); INFOPLIST_FILE = exampleTests/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 9.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); OTHER_LDFLAGS = ( "-ObjC", "-lc++", @@ -703,7 +695,11 @@ COPY_PHASE_STRIP = NO; INFOPLIST_FILE = exampleTests/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 9.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); OTHER_LDFLAGS = ( "-ObjC", "-lc++", @@ -734,7 +730,11 @@ "FB_SONARKIT_ENABLED=1", ); INFOPLIST_FILE = example/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); OTHER_LDFLAGS = ( "$(inherited)", "-ObjC", @@ -762,7 +762,11 @@ "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = arm64; GCC_INPUT_FILETYPE = sourcecode.cpp.objcpp; INFOPLIST_FILE = example/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); OTHER_LDFLAGS = ( "$(inherited)", "-ObjC", @@ -789,7 +793,10 @@ ENABLE_TESTABILITY = YES; GCC_NO_COMMON_BLOCKS = YES; INFOPLIST_FILE = "example-tvOS/Info.plist"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); OTHER_LDFLAGS = ( "$(inherited)", "-ObjC", @@ -817,7 +824,10 @@ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; GCC_NO_COMMON_BLOCKS = YES; INFOPLIST_FILE = "example-tvOS/Info.plist"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); OTHER_LDFLAGS = ( "$(inherited)", "-ObjC", @@ -844,7 +854,11 @@ ENABLE_TESTABILITY = YES; GCC_NO_COMMON_BLOCKS = YES; INFOPLIST_FILE = "example-tvOSTests/Info.plist"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); OTHER_LDFLAGS = ( "$(inherited)", "-ObjC", @@ -871,7 +885,11 @@ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; GCC_NO_COMMON_BLOCKS = YES; INFOPLIST_FILE = "example-tvOSTests/Info.plist"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); OTHER_LDFLAGS = ( "$(inherited)", "-ObjC", @@ -934,7 +952,10 @@ GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 9.0; - LD_RUNPATH_SEARCH_PATHS = "/usr/lib/swift $(inherited)"; + LD_RUNPATH_SEARCH_PATHS = ( + /usr/lib/swift, + "$(inherited)", + ); LIBRARY_SEARCH_PATHS = ( "$(SDKROOT)/usr/lib/swift", "\"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)\"", @@ -989,7 +1010,10 @@ GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 9.0; - LD_RUNPATH_SEARCH_PATHS = "/usr/lib/swift $(inherited)"; + LD_RUNPATH_SEARCH_PATHS = ( + /usr/lib/swift, + "$(inherited)", + ); LIBRARY_SEARCH_PATHS = ( "$(SDKROOT)/usr/lib/swift", "\"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)\"", diff --git a/example/ios/qonversion_fallbacks.json b/example/ios/qonversion_fallbacks.json new file mode 100644 index 0000000..5cd8f59 --- /dev/null +++ b/example/ios/qonversion_fallbacks.json @@ -0,0 +1,159 @@ +{ + "products": [ + { + "id": "weekly", + "duration": 0, + "store_id": "io.qonversion.weekly", + "type": 1 + }, + { + "id": "consumable", + "duration": null, + "store_id": "io.qonversion.consumable", + "type": 2 + }, + { + "id": "subs_plus_trial", + "duration": 1, + "store_id": "io.qonversion.subs.monthly.plus.trial", + "type": 0 + }, + { + "id": "annual", + "duration": 4, + "store_id": "io.qonversion.subs.annual", + "type": 0 + }, + { + "id": "in_app", + "duration": null, + "store_id": "io.qonversion.nonconsumable", + "type": 2 + } + ], + "offerings": [ + { + "id": "main", + "tag": 1, + "products": [ + { + "id": "weekly", + "duration": 0, + "store_id": "io.qonversion.weekly", + "type": 1 + }, + { + "id": "annual", + "duration": 4, + "store_id": "io.qonversion.subs.annual", + "type": 0 + }, + { + "id": "consumable", + "duration": null, + "store_id": "io.qonversion.consumable", + "type": 2 + } + ] + }, + { + "id": "discounted_offer", + "tag": 0, + "products": [] + } + ], + "products_permissions": { + "weekly": [ + "plus" + ], + "consumable": [], + "subs_plus_trial": [ + "standart" + ], + "annual": [ + "standart", + "sample" + ], + "in_app": [ + "Premium Movies" + ] + }, + "remote_config_list": [ + { + "experiment": null, + "payload": { + "CTA": "Start Trial", + "CTA_color": "#307BF6", + "main_image": "[IMAGE_URL]", + "product_id": "prod_7d_trial_5.99", + "show_close_button": true + }, + "source": { + "assignment_type": "auto", + "context_key": "main_paywall", + "name": "default paywall", + "type": "remote_configuration", + "uid": "0dcb1bd9-9bc3-4668-84aa-4540d1042c5d" + } + }, + { + "experiment": null, + "payload": { + "CTA": "Start you trial", + "CTA_color": "red", + "main_image": "111", + "product_id": "123123123123123", + "show_close_button": true + }, + "source": { + "assignment_type": "auto", + "context_key": "", + "name": "Default settings", + "type": "remote_configuration", + "uid": "12feb1dd-8096-47bc-a5a1-443fd2828ecc" + } + }, + { + "experiment": null, + "payload": { + "test_key": "test_value" + }, + "source": { + "assignment_type": "auto", + "context_key": "test_context_key", + "name": "Test with context key1", + "type": "remote_configuration", + "uid": "c5077ec4-acf4-41ea-8b43-05114be5d7ce" + } + }, + { + "experiment": null, + "payload": { + "test_key_2": "test_value_2" + }, + "source": { + "assignment_type": "auto", + "context_key": "test_context_key_2", + "name": "Test with context key2 - copy", + "type": "remote_configuration", + "uid": "1c000f2a-2f4b-4736-b5dd-75b13bf73deb" + } + }, + { + "experiment": null, + "payload": { + "bool": true, + "json": { + "key": "value" + } + }, + "source": { + "assignment_type": "auto", + "context_key": "swift_key ", + "name": "Swift", + "type": "remote_configuration", + "uid": "9f85d738-56d8-4f6c-b54a-c08658be2cb4" + } + } + ] +} \ No newline at end of file diff --git a/example/package.json b/example/package.json index 8f89573..0516ed9 100644 --- a/example/package.json +++ b/example/package.json @@ -17,7 +17,7 @@ "@react-native-community/push-notification-ios": "^1.10.1", "babel-preset-react-native": "2.1.0", "react": "18.1.0", - "react-native": "0.70.5", + "react-native": "0.70.7", "react-native-push-notification": "^8.1.1", "react-native-qonversion": "file:../" }, diff --git a/example/yarn.lock b/example/yarn.lock index 5086301..17d7724 100644 --- a/example/yarn.lock +++ b/example/yarn.lock @@ -1312,12 +1312,12 @@ slash "^3.0.0" strip-ansi "^6.0.0" -"@jest/create-cache-key-function@^29.0.3": - version "29.3.1" - resolved "https://registry.yarnpkg.com/@jest/create-cache-key-function/-/create-cache-key-function-29.3.1.tgz#3a0970ea595ab3d9507244edbcef14d6b016cdc9" - integrity sha512-4i+E+E40gK13K78ffD/8cy4lSSqeWwyXeTZoq16tndiCP12hC8uQsPJdIu5C6Kf22fD8UbBk71so7s/6VwpUOQ== +"@jest/create-cache-key-function@^27.0.1": + version "27.5.1" + resolved "https://registry.yarnpkg.com/@jest/create-cache-key-function/-/create-cache-key-function-27.5.1.tgz#7448fae15602ea95c828f5eceed35c202a820b31" + integrity sha512-dmH1yW+makpTSURTy8VzdUwFnfQh1G8R+DxO2Ho2FFmBbKFEVm+3jWdvFhE2VqB/LATCTokkP0dotjyQyw5/AQ== dependencies: - "@jest/types" "^29.3.1" + "@jest/types" "^27.5.1" "@jest/environment@^26.6.2": version "26.6.2" @@ -1382,13 +1382,6 @@ optionalDependencies: node-notifier "^8.0.0" -"@jest/schemas@^29.0.0": - version "29.0.0" - resolved "https://registry.yarnpkg.com/@jest/schemas/-/schemas-29.0.0.tgz#5f47f5994dd4ef067fb7b4188ceac45f77fe952a" - integrity sha512-3Ab5HgYIIAnS0HjqJHQYZS+zXc4tUmTmBH3z83ajI6afXp8X3ZtdLX+nXx+I7LNkJD7uN9LAVhgnjDgZa2z0kA== - dependencies: - "@sinclair/typebox" "^0.24.1" - "@jest/source-map@^26.6.2": version "26.6.2" resolved "https://registry.yarnpkg.com/@jest/source-map/-/source-map-26.6.2.tgz#29af5e1e2e324cafccc936f218309f54ab69d535" @@ -1462,18 +1455,6 @@ "@types/yargs" "^16.0.0" chalk "^4.0.0" -"@jest/types@^29.3.1": - version "29.3.1" - resolved "https://registry.yarnpkg.com/@jest/types/-/types-29.3.1.tgz#7c5a80777cb13e703aeec6788d044150341147e3" - integrity sha512-d0S0jmmTpjnhCmNpApgX3jrUZgZ22ivKJRvL2lli5hpCRoNnp1f85r2/wpKfXuYu8E7Jjh1hGfhPyup1NM5AmA== - dependencies: - "@jest/schemas" "^29.0.0" - "@types/istanbul-lib-coverage" "^2.0.0" - "@types/istanbul-reports" "^3.0.0" - "@types/node" "*" - "@types/yargs" "^17.0.8" - chalk "^4.0.0" - "@jridgewell/gen-mapping@^0.1.0": version "0.1.1" resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.1.1.tgz#e5d2e450306a9491e3bd77e323e38d7aff315996" @@ -1556,7 +1537,7 @@ dependencies: serve-static "^1.13.1" -"@react-native-community/cli-doctor@^9.2.1": +"@react-native-community/cli-doctor@^9.3.0": version "9.3.0" resolved "https://registry.yarnpkg.com/@react-native-community/cli-doctor/-/cli-doctor-9.3.0.tgz#8817a3fd564453467def5b5bc8aecdc4205eff50" integrity sha512-/fiuG2eDGC2/OrXMOWI5ifq4X1gdYTQhvW2m0TT5Lk1LuFiZsbTCp1lR+XILKekuTvmYNjEGdVpeDpdIWlXdEA== @@ -1578,31 +1559,18 @@ sudo-prompt "^9.0.0" wcwidth "^1.0.1" -"@react-native-community/cli-hermes@^9.2.1": - version "9.3.1" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-hermes/-/cli-hermes-9.3.1.tgz#569d27c1effd684ba451ad4614e29a99228cec49" - integrity sha512-Mq4PK8m5YqIdaVq5IdRfp4qK09aVO+aiCtd6vjzjNUgk1+1X5cgUqV6L65h4N+TFJYJHcp2AnB+ik1FAYXvYPQ== +"@react-native-community/cli-hermes@^9.3.1": + version "9.3.4" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-hermes/-/cli-hermes-9.3.4.tgz#47851847c4990272687883bd8bf53733d5f3c341" + integrity sha512-VqTPA7kknCXgtYlRf+sDWW4yxZ6Gtg1Ga+Rdrn1qSKuo09iJ8YKPoQYOu5nqbIYJQAEhorWQyo1VvNgd0wd49w== dependencies: - "@react-native-community/cli-platform-android" "^9.3.1" + "@react-native-community/cli-platform-android" "^9.3.4" "@react-native-community/cli-tools" "^9.2.1" chalk "^4.1.2" hermes-profile-transformer "^0.0.6" ip "^1.1.5" -"@react-native-community/cli-platform-android@9.2.1": - version "9.2.1" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-platform-android/-/cli-platform-android-9.2.1.tgz#cd73cb6bbaeb478cafbed10bd12dfc01b484d488" - integrity sha512-VamCZ8nido3Q3Orhj6pBIx48itORNPLJ7iTfy3nucD1qISEDih3DOzCaQCtmqdEBgUkNkNl0O+cKgq5A3th3Zg== - dependencies: - "@react-native-community/cli-tools" "^9.2.1" - chalk "^4.1.2" - execa "^1.0.0" - fs-extra "^8.1.0" - glob "^7.1.3" - logkitty "^0.7.1" - slash "^3.0.0" - -"@react-native-community/cli-platform-android@^9.3.1": +"@react-native-community/cli-platform-android@9.3.1": version "9.3.1" resolved "https://registry.yarnpkg.com/@react-native-community/cli-platform-android/-/cli-platform-android-9.3.1.tgz#378cd72249653cc74672094400657139f21bafb8" integrity sha512-m0bQ6Twewl7OEZoVf79I2GZmsDqh+Gh0bxfxWgwxobsKDxLx8/RNItAo1lVtTCgzuCR75cX4EEO8idIF9jYhew== @@ -1615,18 +1583,20 @@ logkitty "^0.7.1" slash "^3.0.0" -"@react-native-community/cli-platform-ios@9.2.1": - version "9.2.1" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-platform-ios/-/cli-platform-ios-9.2.1.tgz#d90740472216ffae5527dfc5f49063ede18a621f" - integrity sha512-dEgvkI6CFgPk3vs8IOR0toKVUjIFwe4AsXFvWWJL5qhrIzW9E5Owi0zPkSvzXsMlfYMbVX0COfVIK539ZxguSg== +"@react-native-community/cli-platform-android@^9.3.4": + version "9.3.4" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-platform-android/-/cli-platform-android-9.3.4.tgz#42f22943b6ee15713add6af8608c1d0ebf79d774" + integrity sha512-BTKmTMYFuWtMqimFQJfhRyhIWw1m+5N5svR1S5+DqPcyFuSXrpNYDWNSFR8E105xUbFANmsCZZQh6n1WlwMpOA== dependencies: "@react-native-community/cli-tools" "^9.2.1" chalk "^4.1.2" execa "^1.0.0" + fs-extra "^8.1.0" glob "^7.1.3" - ora "^5.4.1" + logkitty "^0.7.1" + slash "^3.0.0" -"@react-native-community/cli-platform-ios@^9.3.0": +"@react-native-community/cli-platform-ios@9.3.0", "@react-native-community/cli-platform-ios@^9.3.0": version "9.3.0" resolved "https://registry.yarnpkg.com/@react-native-community/cli-platform-ios/-/cli-platform-ios-9.3.0.tgz#45abde2a395fddd7cf71e8b746c1dc1ee2260f9a" integrity sha512-nihTX53BhF2Q8p4B67oG3RGe1XwggoGBrMb6vXdcu2aN0WeXJOXdBLgR900DAA1O8g7oy1Sudu6we+JsVTKnjw== @@ -1690,16 +1660,16 @@ dependencies: joi "^17.2.1" -"@react-native-community/cli@9.2.1": - version "9.2.1" - resolved "https://registry.yarnpkg.com/@react-native-community/cli/-/cli-9.2.1.tgz#15cc32531fc323d4232d57b1f2d7c571816305ac" - integrity sha512-feMYS5WXXKF4TSWnCXozHxtWq36smyhGaENXlkiRESfYZ1mnCUlPfOanNCAvNvBqdyh9d4o0HxhYKX1g9l6DCQ== +"@react-native-community/cli@9.3.2": + version "9.3.2" + resolved "https://registry.yarnpkg.com/@react-native-community/cli/-/cli-9.3.2.tgz#81761880af00c1894d85380d8c9a358659865204" + integrity sha512-IAW4X0vmX/xozNpp/JVZaX7MrC85KV0OP2DF4o7lNGOfpUhzJAEWqTfkxFYS+VsRjZHDve4wSTiGIuXwE7FG1w== dependencies: "@react-native-community/cli-clean" "^9.2.1" "@react-native-community/cli-config" "^9.2.1" "@react-native-community/cli-debugger-ui" "^9.0.0" - "@react-native-community/cli-doctor" "^9.2.1" - "@react-native-community/cli-hermes" "^9.2.1" + "@react-native-community/cli-doctor" "^9.3.0" + "@react-native-community/cli-hermes" "^9.3.1" "@react-native-community/cli-plugin-metro" "^9.2.1" "@react-native-community/cli-server-api" "^9.2.1" "@react-native-community/cli-tools" "^9.2.1" @@ -1776,11 +1746,6 @@ resolved "https://registry.yarnpkg.com/@sideway/pinpoint/-/pinpoint-2.0.0.tgz#cff8ffadc372ad29fd3f78277aeb29e632cc70df" integrity sha512-RNiOoTPkptFtSVzQevY/yWtZwf/RxyVnPy/OcA9HBM3MlGDnBEYL5B41H0MTn0Uec8Hi+2qUtTfG2WWZBmMejQ== -"@sinclair/typebox@^0.24.1": - version "0.24.51" - resolved "https://registry.yarnpkg.com/@sinclair/typebox/-/typebox-0.24.51.tgz#645f33fe4e02defe26f2f5c0410e1c094eac7f5f" - integrity sha512-1P1OROm/rdubP5aFDSZQILU0vrLCJ4fvHt6EoqHEM+2D/G5MK3bIaymUKLit8Js9gbns5UyJnkP/TZROLw4tUA== - "@sinonjs/commons@^1.7.0": version "1.8.3" resolved "https://registry.yarnpkg.com/@sinonjs/commons/-/commons-1.8.3.tgz#3802ddd21a50a949b6721ddd72da36e67e7f1b2d" @@ -1920,13 +1885,6 @@ dependencies: "@types/yargs-parser" "*" -"@types/yargs@^17.0.8": - version "17.0.13" - resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-17.0.13.tgz#34cced675ca1b1d51fcf4d34c3c6f0fa142a5c76" - integrity sha512-9sWaruZk2JGxIQU+IhI1fhPYRcQ0UuTNuKuCW9bR5fp7qi2Llf7WDzNa17Cy7TKnh3cdxDOiyTu6gaLS0eDatg== - dependencies: - "@types/yargs-parser" "*" - "@typescript-eslint/eslint-plugin@^3.1.0": version "3.10.1" resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-3.10.1.tgz#7e061338a1383f59edc204c605899f93dc2e2c8f" @@ -6488,10 +6446,10 @@ progress@^2.0.0: resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.3.tgz#7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8" integrity sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA== -promise@^8.0.3: - version "8.1.0" - resolved "https://registry.yarnpkg.com/promise/-/promise-8.1.0.tgz#697c25c3dfe7435dd79fcd58c38a135888eaf05e" - integrity sha512-W04AqnILOL/sPRXziNicCjSNRruLAuIHEOVBazepu0545DDNGYHz7ar9ZgZ1fMU8/MA4mVxp5rkBWRi6OXIy3Q== +promise@^8.3.0: + version "8.3.0" + resolved "https://registry.yarnpkg.com/promise/-/promise-8.3.0.tgz#8cb333d1edeb61ef23869fbb8a4ea0279ab60e0a" + integrity sha512-rZPNPKTOYVNEEKFaq1HqTgOwZD+4/YHS5ukLzQCypkj+OkYx7iv0mA91lJlpPPZ8vMau3IIGj5Qlwrx+8iiSmg== dependencies: asap "~2.0.6" @@ -6597,17 +6555,17 @@ react-native-push-notification@^8.1.1: integrity sha512-XpBtG/w+a6WXTxu6l1dNYyTiHnbgnvjoc3KxPTxYkaIABRmvuJZkFxqruyGvfCw7ELAlZEAJO+dthdTabCe1XA== "react-native-qonversion@file:..": - version "3.6.2" + version "7.5.0" -react-native@0.70.5: - version "0.70.5" - resolved "https://registry.yarnpkg.com/react-native/-/react-native-0.70.5.tgz#f60540b21d338891086e0a834e331c124dd1f55c" - integrity sha512-5NZM80LC3L+TIgQX/09yiyy48S73wMgpIgN5cCv3XTMR394+KpDI3rBZGH4aIgWWuwijz31YYVF5504+9n2Zfw== +react-native@0.70.7: + version "0.70.7" + resolved "https://registry.yarnpkg.com/react-native/-/react-native-0.70.7.tgz#515d0fd991703b879fcc1ee95d896946a9dd6704" + integrity sha512-MvnJJXiEPuOBbf1VPY5WXIUR/n6QB/DAk5XtBz3bzinpy9YBXiiQkhGIrTpVdVt37JeHOzafhfxAMf+Rs8jpvA== dependencies: - "@jest/create-cache-key-function" "^29.0.3" - "@react-native-community/cli" "9.2.1" - "@react-native-community/cli-platform-android" "9.2.1" - "@react-native-community/cli-platform-ios" "9.2.1" + "@jest/create-cache-key-function" "^27.0.1" + "@react-native-community/cli" "9.3.2" + "@react-native-community/cli-platform-android" "9.3.1" + "@react-native-community/cli-platform-ios" "9.3.0" "@react-native/assets" "1.0.0" "@react-native/normalize-color" "2.0.0" "@react-native/polyfills" "2.0.0" @@ -6624,7 +6582,7 @@ react-native@0.70.5: mkdirp "^0.5.1" nullthrows "^1.1.1" pretty-format "^26.5.2" - promise "^8.0.3" + promise "^8.3.0" react-devtools-core "4.24.0" react-native-codegen "^0.70.6" react-native-gradle-plugin "^0.70.3" diff --git a/react-native-qonversion.podspec b/react-native-qonversion.podspec index 167b32f..3b46900 100644 --- a/react-native-qonversion.podspec +++ b/react-native-qonversion.podspec @@ -22,5 +22,5 @@ Pod::Spec.new do |s| s.requires_arc = true s.dependency "React" - s.dependency "QonversionSandwich", "4.5.0" + s.dependency "QonversionSandwich", "5.0.2" end diff --git a/src/QonversionApi.ts b/src/QonversionApi.ts index 4a56923..4e3c6a4 100644 --- a/src/QonversionApi.ts +++ b/src/QonversionApi.ts @@ -26,6 +26,12 @@ interface QonversionApi { */ syncStoreKit2Purchases(): void; + /** + * Call this function to check if the fallback file is accessible. + * @returns the promise with the flag that indicates whether Qonversion was able to read data from the fallback file or not. + */ + isFallbackFileAccessible(): Promise; + /** * Make a purchase and validate it through server-to-server using Qonversion's Backend * @param purchaseModel necessary information for purchase diff --git a/src/internal/QonversionInternal.ts b/src/internal/QonversionInternal.ts index a614be5..b970d36 100644 --- a/src/internal/QonversionInternal.ts +++ b/src/internal/QonversionInternal.ts @@ -19,7 +19,7 @@ import {RemoteConfigList} from '../index'; const {RNQonversion} = NativeModules; -const sdkVersion = "7.5.0"; +const sdkVersion = "8.0.0"; const EVENT_ENTITLEMENTS_UPDATED = "entitlements_updated"; const EVENT_PROMO_PURCHASE_RECEIVED = "promo_purchase_received"; @@ -52,6 +52,12 @@ export default class QonversionInternal implements QonversionApi { } } + async isFallbackFileAccessible(): Promise { + const isAccessibleResult = await RNQonversion.isFallbackFileAccessible(); + + return isAccessibleResult.success; + } + async purchase(purchaseModel: PurchaseModel): Promise> { try { let purchasePromise: Promise | null | undefined>; From 3af1691115289a76b0a2997bfbd1fdcd547fedd5 Mon Sep 17 00:00:00 2001 From: Surik Date: Mon, 8 Jul 2024 23:14:36 +0400 Subject: [PATCH 6/6] Updated fallback support logic --- .../src/main/java/com/reactlibrary/QonversionModule.java | 6 +++--- ...n_fallbacks.json => qonversion_android_fallbacks.json} | 0 example/ios/example.xcodeproj/project.pbxproj | 8 ++++---- ...rsion_fallbacks.json => qonversion_ios_fallbacks.json} | 2 +- ios/RNQonversion.m | 6 ++++++ package.json | 2 +- 6 files changed, 15 insertions(+), 9 deletions(-) rename example/android/app/src/main/assets/{qonversion_fallbacks.json => qonversion_android_fallbacks.json} (100%) rename example/ios/{qonversion_fallbacks.json => qonversion_ios_fallbacks.json} (99%) diff --git a/android/src/main/java/com/reactlibrary/QonversionModule.java b/android/src/main/java/com/reactlibrary/QonversionModule.java index 74b8246..d6f2f52 100644 --- a/android/src/main/java/com/reactlibrary/QonversionModule.java +++ b/android/src/main/java/com/reactlibrary/QonversionModule.java @@ -212,9 +212,9 @@ public void detachUserFromRemoteConfiguration(final String remoteConfigurationId } @ReactMethod - public void isFallbackFileAccessible(final Promise promise) { - qonversionSandwich.isFallbackFileAccessible(Utils.getResultListener(promise)); - } + public void isFallbackFileAccessible(final Promise promise) { + qonversionSandwich.isFallbackFileAccessible(Utils.getResultListener(promise)); + } @Override public void onEntitlementsUpdated(@NonNull Map map) { diff --git a/example/android/app/src/main/assets/qonversion_fallbacks.json b/example/android/app/src/main/assets/qonversion_android_fallbacks.json similarity index 100% rename from example/android/app/src/main/assets/qonversion_fallbacks.json rename to example/android/app/src/main/assets/qonversion_android_fallbacks.json diff --git a/example/ios/example.xcodeproj/project.pbxproj b/example/ios/example.xcodeproj/project.pbxproj index dfd2ded..422e675 100644 --- a/example/ios/example.xcodeproj/project.pbxproj +++ b/example/ios/example.xcodeproj/project.pbxproj @@ -17,7 +17,7 @@ 2D02E4BD1E0B4A84006451C7 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; }; 2D02E4BF1E0B4AB3006451C7 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; }; 2DCD954D1E0B4F2C00145EB5 /* exampleTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* exampleTests.m */; }; - 7000C87F2C2EFD9B00E3CC5A /* qonversion_fallbacks.json in Resources */ = {isa = PBXBuildFile; fileRef = 7000C87E2C2EFD9B00E3CC5A /* qonversion_fallbacks.json */; }; + 7000C87F2C2EFD9B00E3CC5A /* qonversion_ios_fallbacks.json in Resources */ = {isa = PBXBuildFile; fileRef = 7000C87E2C2EFD9B00E3CC5A /* qonversion_ios_fallbacks.json */; }; A90D88B639E5B9BE4E5CC169 /* libPods-example-tvOSTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 8A15F8FB406D63FC234399C8 /* libPods-example-tvOSTests.a */; }; E376607E3D831381D69CE332 /* libPods-example-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1551CD4A26CA41534DD33810 /* libPods-example-tvOS.a */; }; EF2EF379DD8CEA3852E93EF7 /* libPods-example-exampleTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1E38E12D1A0FA33D55B2EF4E /* libPods-example-exampleTests.a */; }; @@ -63,7 +63,7 @@ 504F4A05A0695786BFBE7FA6 /* Pods-example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-example.debug.xcconfig"; path = "Target Support Files/Pods-example/Pods-example.debug.xcconfig"; sourceTree = ""; }; 5F01FC8542633FEE1BA15CDA /* Pods-example-tvOSTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-example-tvOSTests.debug.xcconfig"; path = "Target Support Files/Pods-example-tvOSTests/Pods-example-tvOSTests.debug.xcconfig"; sourceTree = ""; }; 6A26A7A527DF87A800281166 /* example.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; name = example.entitlements; path = example/example.entitlements; sourceTree = ""; }; - 7000C87E2C2EFD9B00E3CC5A /* qonversion_fallbacks.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = qonversion_fallbacks.json; sourceTree = ""; }; + 7000C87E2C2EFD9B00E3CC5A /* qonversion_ios_fallbacks.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = qonversion_ios_fallbacks.json; sourceTree = ""; }; 8A15F8FB406D63FC234399C8 /* libPods-example-tvOSTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-example-tvOSTests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 8D1EB4B9E4604B002F0905BE /* Pods-example-tvOS.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-example-tvOS.release.xcconfig"; path = "Target Support Files/Pods-example-tvOS/Pods-example-tvOS.release.xcconfig"; sourceTree = ""; }; 91393DDA1A12547852AE38A3 /* Pods-example-exampleTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-example-exampleTests.release.xcconfig"; path = "Target Support Files/Pods-example-exampleTests/Pods-example-exampleTests.release.xcconfig"; sourceTree = ""; }; @@ -129,7 +129,7 @@ 13B07FAE1A68108700A75B9A /* example */ = { isa = PBXGroup; children = ( - 7000C87E2C2EFD9B00E3CC5A /* qonversion_fallbacks.json */, + 7000C87E2C2EFD9B00E3CC5A /* qonversion_ios_fallbacks.json */, 6A26A7A527DF87A800281166 /* example.entitlements */, 008F07F21AC5B25A0029DE68 /* main.jsbundle */, 13B07FAF1A68108700A75B9A /* AppDelegate.h */, @@ -351,7 +351,7 @@ files = ( 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */, 13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */, - 7000C87F2C2EFD9B00E3CC5A /* qonversion_fallbacks.json in Resources */, + 7000C87F2C2EFD9B00E3CC5A /* qonversion_ios_fallbacks.json in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/example/ios/qonversion_fallbacks.json b/example/ios/qonversion_ios_fallbacks.json similarity index 99% rename from example/ios/qonversion_fallbacks.json rename to example/ios/qonversion_ios_fallbacks.json index 5cd8f59..7edb74c 100644 --- a/example/ios/qonversion_fallbacks.json +++ b/example/ios/qonversion_ios_fallbacks.json @@ -156,4 +156,4 @@ } } ] -} \ No newline at end of file +} diff --git a/ios/RNQonversion.m b/ios/RNQonversion.m index 53f19f0..38fd3eb 100644 --- a/ios/RNQonversion.m +++ b/ios/RNQonversion.m @@ -158,6 +158,12 @@ + (BOOL)requiresMainQueueSetup }]; } +RCT_EXPORT_METHOD(isFallbackFileAccessible:(RCTResponseSenderBlock)completion rejecter:(RCTPromiseRejectBlock)reject) { + [_qonversionSandwich isFallbackFileAccessibleWithCompletion:^(NSDictionary * _Nullable result, SandwichError * _Nullable error) { + [self handleResult:result error:error completion:completion rejecter:reject]; + }]; +} + RCT_EXPORT_METHOD(collectAdvertisingID) { [_qonversionSandwich collectAdvertisingId]; } diff --git a/package.json b/package.json index cebf61f..34d5bea 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "react-native-qonversion", "title": "React Native Qonversion", - "version": "7.5.0", + "version": "8.0.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": "build/index.js", "types": "build/index.d.ts",