Skip to content

Commit

Permalink
version 2.10.0
Browse files Browse the repository at this point in the history
  • Loading branch information
vladd-g committed Mar 25, 2024
2 parents dfd9498 + 4b5acc4 commit 6082cb0
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 46 deletions.
1 change: 0 additions & 1 deletion lib/ios/RNAConstants.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ public enum ParamKey: String {
case placementId = "placement_id"
case loadTimeout = "load_timeout"
case idfaDisabled = "idfa_collection_disabled"
case storekit2Usage = "storekit2_usage"
case bridgeVersion = "PLIST Bridge version"
case prefetch_products = "prefetch_products"
case custom_tags = "custom_tags"
Expand Down
14 changes: 1 addition & 13 deletions lib/ios/RNAdapty.swift
Original file line number Diff line number Diff line change
Expand Up @@ -215,17 +215,6 @@ class RNAdapty: RCTEventEmitter, AdaptyDelegate {
let logLevel: String? = ctx.params.getOptionalValue(for: .logLevel)
let observerMode: Bool? = ctx.params.getOptionalValue(for: .observerMode)
let idfaCollectionDisabled: Bool? = ctx.params.getOptionalValue(for: .idfaDisabled)
let storeKit2UsageString: String? = ctx.params.getOptionalValue(for: .storekit2Usage)

let storeKit2Usage: StoreKit2Usage
switch storeKit2UsageString {
case "enabled_for_introductory_offer_eligibility":
storeKit2Usage = .forIntroEligibilityCheck
case "disabled":
storeKit2Usage = .disabled
default:
storeKit2Usage = .default
}

// Memoize activation args
MEMO_ACTIVATION_ARGS[ParamKey.sdkKey.rawValue] = apiKey
Expand All @@ -243,8 +232,7 @@ class RNAdapty: RCTEventEmitter, AdaptyDelegate {
Adapty.activate(
apiKey,
observerMode: observerMode ?? false,
customerUserId: customerUserId,
storeKit2Usage: storeKit2Usage
customerUserId: customerUserId
) { maybeErr in ctx.okOrForwardError(maybeErr) }


Expand Down
3 changes: 0 additions & 3 deletions lib/src/adapty-handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,6 @@ export class Adapty {
}

if (Platform.OS === 'ios') {
if (params.ios?.storeKit2Usage) {
body.set('storekit2_usage', params.ios.storeKit2Usage);
}
if (params.ios?.idfaCollectionDisabled) {
body.set('idfa_collection_disabled', params.ios.idfaCollectionDisabled);
}
Expand Down
26 changes: 0 additions & 26 deletions lib/src/types/inputs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,13 +145,6 @@ export interface ActivateParamsInput {
*/
__debugDeferActivation?: boolean;
ios?: {
/**
* Controls what APIs from StoreKit 2 would be used
*
* Read more: {@link https://docs.adapty.io/docs/displaying-products#adapty-sdk-version-250-and-higher}
* @default 'disabled'
*/
storeKit2Usage?: IosStorekit2Usage;
/**
* Disables IDFA collection
* @default false
Expand Down Expand Up @@ -186,22 +179,3 @@ export interface AdaptyAndroidSubscriptionUpdateParameters {
export interface MakePurchaseParamsInput {
android?: AdaptyAndroidSubscriptionUpdateParameters;
}
export const IosStorekit2Usage = Object.freeze({
/**
* Adapty will use the legacy logic, based on receipt analysis and validation.
* However, in rare situations (and in Sandbox mode - always)
* the reecipt is not present on the device at the first startup,
* therefore this option will return an error.
*/
Disabled: 'disabled',
/**
* Adapty will utilise StoreKit 2 logic to determine introductory offer eligibility.
* @requires iOS 15.0+
* @remarks
* StoreKit 2 is available since iOS 15.0. Adapty will implement the legacy logic for older versions.
*/
EnabledForIntroductoryOfferEligibility:
'enabled_for_introductory_offer_eligibility',
});
export type IosStorekit2Usage =
(typeof IosStorekit2Usage)[keyof typeof IosStorekit2Usage];
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "https://json.schemastore.org/package",
"name": "react-native-adapty",
"version": "2.9.8",
"version": "2.10.0",
"description": "Adapty React Native SDK",
"license": "MIT",
"author": "Vanya Dorofeyev <[email protected]> (https://github.com/divanc)",
Expand Down
4 changes: 2 additions & 2 deletions react-native-adapty-sdk.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ Pod::Spec.new do |s|
s.homepage = "https://github.com/adaptyteam/AdaptySDK-React-Native"
s.license = { :type => "MIT", :file => "LICENSE" }
s.authors = { "Ivan Dorofeyev" => "[email protected]" }
s.platforms = { :ios => "11.0" }
s.platforms = { :ios => "12.2" }
s.source = { :git => "https://github.com/adaptyteam/AdaptySDK-React-Native.git", :tag => "#{s.version}" }

s.source_files = "lib/ios/**/*.{h,c,m,swift}"
s.resources = "lib/ios/**/*.{plist}"
s.requires_arc = true

s.dependency "Adapty", "2.9.6"
s.dependency "Adapty", "2.10.1"
s.dependency "React"
end

0 comments on commit 6082cb0

Please sign in to comment.