From 7b161fbfa11305540220bbc1a0d74cecb6343873 Mon Sep 17 00:00:00 2001 From: Kamo Spertsyan Date: Thu, 8 Jan 2026 14:02:23 +0300 Subject: [PATCH 1/3] Custom localization support for No-Codes --- .../io/qonversion/sandwich/NoCodesSandwich.kt | 11 ++++++++++- ios/sandwich/NoCodesSandwich.swift | 13 +++++++++++-- 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/android/sandwich/src/main/kotlin/io/qonversion/sandwich/NoCodesSandwich.kt b/android/sandwich/src/main/kotlin/io/qonversion/sandwich/NoCodesSandwich.kt index 3b5f61e..1c199df 100644 --- a/android/sandwich/src/main/kotlin/io/qonversion/sandwich/NoCodesSandwich.kt +++ b/android/sandwich/src/main/kotlin/io/qonversion/sandwich/NoCodesSandwich.kt @@ -39,7 +39,8 @@ class NoCodesSandwich { projectKey: String, proxyUrl: String? = null, logLevelKey: String? = null, - logTag: String? = null + logTag: String? = null, + locale: String? = null ) { val configBuilder = NoCodesConfig.Builder(context, projectKey) @@ -60,6 +61,10 @@ class NoCodesSandwich { configBuilder.setLogTag(it) } + locale?.takeIf { it.isNotEmpty() }?.let { + configBuilder.setLocale(it) + } + NoCodes.initialize(configBuilder.build()) } @@ -132,6 +137,10 @@ class NoCodesSandwich { NoCodes.shared.setLogTag(logTag) } + fun setLocale(locale: String?) { + NoCodes.shared.setLocale(locale) + } + // endregion // region Purchase Management diff --git a/ios/sandwich/NoCodesSandwich.swift b/ios/sandwich/NoCodesSandwich.swift index e2308cd..58f08ed 100644 --- a/ios/sandwich/NoCodesSandwich.swift +++ b/ios/sandwich/NoCodesSandwich.swift @@ -26,9 +26,14 @@ public class NoCodesSandwich: NSObject { @objc public func initialize( projectKey: String, - proxyUrl: String? = nil + proxyUrl: String? = nil, + locale: String? = nil ) { - let noCodesConfig = NoCodesConfiguration(projectKey: projectKey, proxyURL: proxyUrl?.isEmpty == true ? nil : proxyUrl) + let noCodesConfig = NoCodesConfiguration( + projectKey: projectKey, + proxyURL: proxyUrl?.isEmpty == true ? nil : proxyUrl, + locale: locale?.isEmpty == true ? nil : locale + ) NoCodes.initialize(with: noCodesConfig) NoCodes.shared.set(delegate: self) @@ -62,6 +67,10 @@ public class NoCodesSandwich: NSObject { NoCodes.shared.close() } + @objc public func setLocale(_ locale: String?) { + NoCodes.shared.setLocale(locale) + } + @objc public func getAvailableEvents() -> [String] { let availableEvents: [NoCodesEvent] = [ .screenShown, From 7b26d60bb4fbf5e83a5c80f4ef7b3377e1ff23dd Mon Sep 17 00:00:00 2001 From: Kamo Spertsyan Date: Thu, 8 Jan 2026 14:07:12 +0300 Subject: [PATCH 2/3] Updated native dependancies --- QonversionSandwich.podspec | 2 +- android/sandwich/build.gradle | 2 +- ios/Podfile | 4 ---- ios/Podfile.lock | 16 ++++++++-------- 4 files changed, 10 insertions(+), 14 deletions(-) diff --git a/QonversionSandwich.podspec b/QonversionSandwich.podspec index 5c21291..421e49d 100644 --- a/QonversionSandwich.podspec +++ b/QonversionSandwich.podspec @@ -16,6 +16,6 @@ Pod::Spec.new do |s| "osx" => "10.13" } s.source_files = 'ios/sandwich/**/*.{h,m,swift}' - s.dependency "Qonversion", "6.1.0" + s.dependency "Qonversion", "6.3.0" s.module_name = 'QonversionSandwich' end diff --git a/android/sandwich/build.gradle b/android/sandwich/build.gradle index 0b31f03..4c9b7c8 100644 --- a/android/sandwich/build.gradle +++ b/android/sandwich/build.gradle @@ -1,5 +1,5 @@ buildscript { - ext.nocodes_version = '1.2.1' + ext.nocodes_version = '1.3.0' } plugins { diff --git a/ios/Podfile b/ios/Podfile index a9e6ef5..8444163 100644 --- a/ios/Podfile +++ b/ios/Podfile @@ -4,10 +4,6 @@ source 'https://github.com/CocoaPods/Specs.git' platform :ios, '13.0' use_frameworks! -# -# target 'QonversionSandwich' do -# pod 'NoCodes', '0.1.3' -# end target 'Sample' do pod 'QonversionSandwich', :path => '../' diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 6407447..d067ea2 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -1,9 +1,9 @@ PODS: - - Qonversion (6.1.0): - - Qonversion/Main (= 6.1.0) - - Qonversion/Main (6.1.0) - - QonversionSandwich (7.1.0): - - Qonversion (= 6.1.0) + - Qonversion (6.3.0): + - Qonversion/Main (= 6.3.0) + - Qonversion/Main (6.3.0) + - QonversionSandwich (7.2.0): + - Qonversion (= 6.3.0) DEPENDENCIES: - QonversionSandwich (from `../`) @@ -17,9 +17,9 @@ EXTERNAL SOURCES: :path: "../" SPEC CHECKSUMS: - Qonversion: 0b64e731cb59f94ab03c132cea2b70552b4dcc2b - QonversionSandwich: 1b9f83ed758c0a9289e09981b82c6e9fc65e7fa4 + Qonversion: 8f8fb604e2b9fb442eeb6a7aefcbc6bd73c3b55a + QonversionSandwich: 4b60cc587d722e0e950fff4db96cad60efb47950 -PODFILE CHECKSUM: e5fb0f1b622edd873d42d0bef64736d62943be41 +PODFILE CHECKSUM: ac49d3b542908b3399ace18f7369621020b752c0 COCOAPODS: 1.16.2 From aeacdbcdb57429600274f8569d3877eafeb6e174 Mon Sep 17 00:00:00 2001 From: Kamo Spertsyan Date: Mon, 12 Jan 2026 11:35:38 +0300 Subject: [PATCH 3/3] Linter fixes --- QonversionSandwich.podspec | 2 +- ios/Podfile.lock | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/QonversionSandwich.podspec b/QonversionSandwich.podspec index 421e49d..a76f2d7 100644 --- a/QonversionSandwich.podspec +++ b/QonversionSandwich.podspec @@ -13,7 +13,7 @@ Pod::Spec.new do |s| s.framework = 'StoreKit' s.platforms = { "ios" => "13.0", - "osx" => "10.13" + "osx" => "10.15" } s.source_files = 'ios/sandwich/**/*.{h,m,swift}' s.dependency "Qonversion", "6.3.0" diff --git a/ios/Podfile.lock b/ios/Podfile.lock index d067ea2..176c24c 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -18,7 +18,7 @@ EXTERNAL SOURCES: SPEC CHECKSUMS: Qonversion: 8f8fb604e2b9fb442eeb6a7aefcbc6bd73c3b55a - QonversionSandwich: 4b60cc587d722e0e950fff4db96cad60efb47950 + QonversionSandwich: f0fcb1ca6cda6162ab49ef13135ef5accc4d826e PODFILE CHECKSUM: ac49d3b542908b3399ace18f7369621020b752c0