Skip to content

Commit

Permalink
version 2.11.0
Browse files Browse the repository at this point in the history
  • Loading branch information
vladd-g committed May 30, 2024
2 parents e3083ef + bbcb354 commit b364f76
Show file tree
Hide file tree
Showing 10 changed files with 12 additions and 21 deletions.
8 changes: 4 additions & 4 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -106,11 +106,11 @@ dependencies {
implementation "com.facebook.react:react-native:+"
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"

compileOnly 'io.adapty:android-sdk:2.10.2'
compileOnly 'io.adapty.internal:crossplatform:2.10.3'
implementation 'io.adapty.internal:crossplatform-ui:2.1.1'
compileOnly 'io.adapty:android-sdk:2.11.2'
compileOnly 'io.adapty.internal:crossplatform:2.11.1'
implementation 'io.adapty.internal:crossplatform-ui:2.11.0'

implementation 'io.adapty:android-ui:2.1.3'
implementation 'io.adapty:android-ui:2.11.0'
}

if (isNewArchitectureEnabled()) {
Expand Down
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
<modelVersion>4.0.0</modelVersion>
<groupId>io.adapty.internal</groupId>
<artifactId>crossplatform-ui</artifactId>
<version>2.1.1</version>
<version>2.11.0</version>
<packaging>aar</packaging>
</project>
2 changes: 0 additions & 2 deletions android/src/main/java/com/adapty/react/ui/RNAUIModule.kt
Original file line number Diff line number Diff line change
Expand Up @@ -155,15 +155,13 @@ class RNAUIModule(private val ctx: ReactApplicationContext) : ReactContextBaseJa
val paywall: AdaptyPaywall = ctx.params.getDecodedValue(
ParamKey.PAYWALL,
)
val locale: String? = ctx.params.getOptionalValue(ParamKey.LOCALE)
val preloadProducts: Boolean = ctx.params.getOptionalValue(ParamKey.PREFETCH_PRODUCTS) ?: false
val personalizedOffers: HashMap<String, Boolean>? = ctx.params.getOptionalValue(ParamKey.PRODUCT_TITLES)
val customTags: HashMap<String, String>? = ctx.params.getDecodedOptionalValue(ParamKey.CUSTOM_TAGS)


helper.handleCreateView(
paywall,
locale ?: "en",
preloadProducts,
personalizedOffers,
customTags,
Expand Down
5 changes: 1 addition & 4 deletions ios/RNAUICallHandler.swift
Original file line number Diff line number Diff line change
Expand Up @@ -118,11 +118,10 @@ class RNAUICallHandler: RCTEventEmitter, AdaptyPaywallControllerDelegate {
private func getConfigurationAndCreateView(
ctx: AdaptyContext,
paywall: AdaptyPaywall,
locale: String?,
preloadProducts: Bool,
customTags: [String: String]?
) {
AdaptyUI.getViewConfiguration(forPaywall: paywall, locale: locale ?? "en") { result in
AdaptyUI.getViewConfiguration(forPaywall: paywall) { result in
switch result {
case let .failure(error):
return ctx.forwardError(error)
Expand Down Expand Up @@ -174,7 +173,6 @@ class RNAUICallHandler: RCTEventEmitter, AdaptyPaywallControllerDelegate {
let paywallStr: String = try ctx.params.getRequiredValue(for: .paywall)
let preloadProducts: Bool? = ctx.params.getOptionalValue(for: .prefetch_products)
let customTags: [String: String]? = try ctx.params.getDecodedOptionalValue(for: .custom_tags, jsonDecoder: AdaptyContext.jsonDecoder)
let locale: String? = ctx.params.getOptionalValue(for: .locale)

guard let paywallData = paywallStr.data(using: .utf8),
let paywall = try? AdaptyContext.jsonDecoder.decode(AdaptyPaywall.self, from: paywallData)
Expand All @@ -186,7 +184,6 @@ class RNAUICallHandler: RCTEventEmitter, AdaptyPaywallControllerDelegate {
getConfigurationAndCreateView(
ctx: ctx,
paywall: paywall,
locale: locale,
preloadProducts: preloadProducts ?? false,
customTags: customTags
)
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "https://json.schemastore.org/package",
"name": "@adapty/react-native-ui",
"version": "2.1.2",
"version": "2.11.0",
"description": "Extension to the Adapty SDK that allows you to easily add purchase screens to your application.",
"license": "MIT",
"author": "Vanya Dorofeyev <[email protected]> (https://github.com/divanc)",
Expand Down Expand Up @@ -46,7 +46,7 @@
},
"peerDependencies": {
"react-native": ">= 0.60.0",
"react-native-adapty": ">=2.10.1"
"react-native-adapty": ">=2.11.0"
},
"devDependencies": {
"@release-it/conventional-changelog": "5.1.1",
Expand All @@ -60,7 +60,7 @@
"prettier": "2.8.8",
"react": "16.13.1",
"react-native": "0.63.0",
"react-native-adapty": "2.10.1",
"react-native-adapty": "2.11.0",
"release-it": "15.11.0",
"typescript": "5.1.3"
},
Expand Down
6 changes: 3 additions & 3 deletions react-native-adapty-ui.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ Pod::Spec.new do |s|

s.source_files = "ios/**/*.{h,m,mm,swift}"

s.dependency "AdaptyUI", "2.1.5"
s.dependency "AdaptyUI", "2.11.2"
s.dependency "React-Core"
s.dependency "Adapty", ">= 2.10.2"
s.dependency "react-native-adapty-sdk", ">= 2.10.1"
s.dependency "Adapty", ">= 2.11.0"
s.dependency "react-native-adapty-sdk", ">= 2.11.0"

# Don't install the dependencies when we run `pod install` in the old architecture.
if ENV['RCT_NEW_ARCH_ENABLED'] == '1' then
Expand Down
1 change: 0 additions & 1 deletion src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,6 @@ export interface CreatePaywallViewParamsInput {
* `true` if you want to prefetch products before presenting a paywall view.
*/
prefetchProducts?: boolean;
locale?: string;
/**
* If you are going to use custom tags functionality, pass an object with tags and corresponding replacement values
*
Expand Down
3 changes: 0 additions & 3 deletions src/view-controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,6 @@ export class ViewController {
body.set('paywall', JSON.stringify(coder.encode(paywall)));

body.set('prefetch_products', params.prefetchProducts ?? true);
if (params.locale) {
body.set('locale', params.locale);
}
if (params.customTags) {
body.set('custom_tags', JSON.stringify(params.customTags));
}
Expand Down

0 comments on commit b364f76

Please sign in to comment.