Skip to content

Commit 9f019d1

Browse files
committed
Merge remote-tracking branch 'origin/release/3.18.0'
2 parents 3515e9c + 1852cf7 commit 9f019d1

10 files changed

Lines changed: 43 additions & 7 deletions

Adapty.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = 'Adapty'
3-
s.version = '3.17.0'
3+
s.version = '3.17.1'
44
s.summary = 'Adapty SDK for iOS.'
55

66
s.description = <<-DESC

AdaptyLogger.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = 'AdaptyLogger'
3-
s.version = '3.17.0'
3+
s.version = '3.17.1'
44
s.summary = 'Adapty Logger for iOS.'
55

66
s.description = <<-DESC

AdaptyPlugin.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = 'AdaptyPlugin'
3-
s.version = '3.17.0'
3+
s.version = '3.17.1'
44
s.summary = 'Common files for cross-platform SDKs Adapty'
55

66
s.description = <<-DESC

AdaptyUI.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = 'AdaptyUI'
3-
s.version = '3.17.0'
3+
s.version = '3.17.1'
44
s.summary = 'Adapty SDK for iOS.'
55

66
s.description = <<-DESC

AdaptyUIBuilder.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = 'AdaptyUIBuilder'
3-
s.version = '3.17.0'
3+
s.version = '3.17.1'
44
s.summary = 'Adapty UI Builder for iOS.'
55

66
s.description = <<-DESC

Sources.AdaptyPlugin/cross_platform.yaml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
$schema: "https://json-schema.org/draft/2020-12/schema"
2-
$id: "https://adapty.io/crossPlatform/3.17.0/schema"
2+
$id: "https://adapty.io/crossPlatform/3.17.1/schema"
33
title: "Cross Platform Format"
44

55
$requests:
@@ -1223,6 +1223,12 @@ $defs:
12231223
profile_id: { type: string }
12241224
customer_user_id: { type: string }
12251225
segment_hash: { type: string }
1226+
applied_attribution_sources:
1227+
type: array
1228+
items:
1229+
type: string
1230+
enum: [apple_search_ads]
1231+
description: "Identifiers of attribution sources applied to the profile. Known values: 'apple_search_ads'. Other identifiers may be emitted in future versions — clients must tolerate unknown values."
12261232
custom_attributes: { $ref: "#/$defs/AdaptyProfile.CustomAttributes" }
12271233
paid_access_levels:
12281234
type: object
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
//
2+
// AdaptyProfile.AttributionSource.swift
3+
// AdaptySDK
4+
//
5+
// Created by Aleksei Valiano on 26.05.2026.
6+
//
7+
8+
extension AdaptyProfile {
9+
public struct AttributionSource: RawRepresentable, Hashable, Sendable, Codable {
10+
public let rawValue: String
11+
12+
public init(rawValue: String) {
13+
self.rawValue = rawValue
14+
}
15+
16+
public static let appleAds = AttributionSource(rawValue: "apple_search_ads")
17+
}
18+
}
19+

Sources/Profile/Entities/AdaptyProfile.swift

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ public struct AdaptyProfile: Sendable {
2121

2222
let codableCustomAttributes: AdaptyProfile.CustomAttributes?
2323

24+
/// Identifiers of attribution sources applied to the profile and available for segmentation.
25+
public let appliedAttributionSources: [AttributionSource]
26+
2427
/// Previously set user custom attributes with `.updateProfile()` method.
2528
public let customAttributes: [String: any Sendable]
2629

@@ -94,6 +97,7 @@ extension AdaptyProfile: Codable {
9497
case version = "timestamp"
9598
case isTestUser = "is_test_user"
9699
case attributes
100+
case appliedAttributionSources = "applied_attribution_sources"
97101
}
98102

99103
public init(from decoder: Decoder) throws {
@@ -114,6 +118,7 @@ extension AdaptyProfile: Codable {
114118
accessLevels = try container.decodeIfPresent([String: AccessLevel].self, forKey: .accessLevels) ?? [:]
115119
subscriptions = try container.decodeIfPresent([String: Subscription].self, forKey: .subscriptions) ?? [:]
116120
nonSubscriptions = try container.decodeIfPresent([String: [NonSubscription]].self, forKey: .nonSubscriptions) ?? [:]
121+
appliedAttributionSources = try container.decodeIfPresent([AdaptyProfile.AttributionSource].self, forKey: .appliedAttributionSources) ?? []
117122
}
118123

119124
public func encode(to encoder: Encoder) throws {
@@ -133,5 +138,9 @@ extension AdaptyProfile: Codable {
133138
if nonSubscriptions.isNotEmpty {
134139
try container.encode(nonSubscriptions, forKey: .nonSubscriptions)
135140
}
141+
if appliedAttributionSources.isNotEmpty {
142+
try container.encode(appliedAttributionSources, forKey: .appliedAttributionSources)
143+
}
144+
136145
}
137146
}

Sources/Profile/OfflineProfileManager.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ final class OfflineProfileManager {
2222
segmentId: "", // TODO: The user hasn't been created on the server; the segmentID is unknown. This user is created when a purchase is made in the Xcode environment, and the server hasn't created the user yet.
2323
isTestUser: false,
2424
codableCustomAttributes: nil,
25+
appliedAttributionSources: [],
2526
customAttributes: [:],
2627
accessLevels: [:],
2728
subscriptions: [:],
@@ -76,6 +77,7 @@ private extension AdaptyProfile {
7677
segmentId: segmentId,
7778
isTestUser: isTestUser,
7879
codableCustomAttributes: codableCustomAttributes,
80+
appliedAttributionSources: appliedAttributionSources,
7981
customAttributes: customAttributes,
8082
accessLevels: accessLevels,
8183
subscriptions: subscriptions,

Sources/Versions.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import Foundation
99
import AdaptyUIBuilder
1010

1111
extension Adapty {
12-
public nonisolated static let SDKVersion = "3.17.0"
12+
public nonisolated static let SDKVersion = "3.17.1"
1313
nonisolated static let fallbackFormatVersion = 9
1414
nonisolated static let userAcquisitionVersion = 1
1515

0 commit comments

Comments
 (0)