Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions QonversionSandwich.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ 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.1.0"
s.dependency "Qonversion", "6.3.0"
s.module_name = 'QonversionSandwich'
end
2 changes: 1 addition & 1 deletion android/sandwich/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
buildscript {
ext.nocodes_version = '1.2.1'
ext.nocodes_version = '1.3.0'
}

plugins {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand All @@ -60,6 +61,10 @@ class NoCodesSandwich {
configBuilder.setLogTag(it)
}

locale?.takeIf { it.isNotEmpty() }?.let {
configBuilder.setLocale(it)
}

NoCodes.initialize(configBuilder.build())
}

Expand Down Expand Up @@ -132,6 +137,10 @@ class NoCodesSandwich {
NoCodes.shared.setLogTag(logTag)
}

fun setLocale(locale: String?) {
NoCodes.shared.setLocale(locale)
}

// endregion

// region Purchase Management
Expand Down
4 changes: 0 additions & 4 deletions ios/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 => '../'
Expand Down
16 changes: 8 additions & 8 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
@@ -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 `../`)
Expand All @@ -17,9 +17,9 @@ EXTERNAL SOURCES:
:path: "../"

SPEC CHECKSUMS:
Qonversion: 0b64e731cb59f94ab03c132cea2b70552b4dcc2b
QonversionSandwich: 1b9f83ed758c0a9289e09981b82c6e9fc65e7fa4
Qonversion: 8f8fb604e2b9fb442eeb6a7aefcbc6bd73c3b55a
QonversionSandwich: f0fcb1ca6cda6162ab49ef13135ef5accc4d826e

PODFILE CHECKSUM: e5fb0f1b622edd873d42d0bef64736d62943be41
PODFILE CHECKSUM: ac49d3b542908b3399ace18f7369621020b752c0

COCOAPODS: 1.16.2
13 changes: 11 additions & 2 deletions ios/sandwich/NoCodesSandwich.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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,
Expand Down