Skip to content

Commit dbbd80a

Browse files
committed
Merge branch 'main' into dave/vc-spend
2 parents 32ec28e + caa1fc5 commit dbbd80a

160 files changed

Lines changed: 1304 additions & 471 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
5.86.0-SNAPSHOT
1+
5.87.0-SNAPSHOT

CHANGELOG.latest.md

Lines changed: 36 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,44 @@
11
## RevenueCat SDK
22
### ✨ New Features
3-
* feat(ads): admob adapter support for reward tracking (#7344) via Peter Porfy (@peterporfy)
4-
### 🐞 Bugfixes
5-
* fix: order queue receipt post after in-flight purchase post (#7072) via Antonio Pallares (@ajpallares)
3+
* feat: add confirmInScene & confirmInWindow purchase params (#4779) via Will Taylor (@fire-at-will)
4+
* feat: Expose displayName and originalPurchaseDate on NonSubscriptionTransaction (#7471) via Facundo Menzella (@facumenzella)
5+
* Track checkpoint hits through the analytics events pipeline (#7447) via Facundo Menzella (@facumenzella)
66

77
## RevenueCatUI SDK
88
### Paywallsv2
99
#### 🐞 Bugfixes
10-
* Fix font scaling setting on workflow paywalls (#7428) via Cesar de la Vega (@vegaro)
10+
* Remove already-subscribed logic from paywalls (#7487) via Antonio Pallares (@ajpallares)
11+
* fix(paywalls): render `product.offer_price` with the same currency format as other prices (#7270) via Cesar de la Vega (@vegaro)
12+
* Fix workflows ignoring `zero_decimal_place_countries` (#7474) via Cesar de la Vega (@vegaro)
13+
### Customer Center
14+
#### 🐞 Bugfixes
15+
* Fix Customer Center prices for subscriptions from different Apple IDs (#7427) via Cesar de la Vega (@vegaro)
1116

1217
### 🔄 Other Changes
13-
* Add rc.rootVar operator for root scope in RulesEngine (#7432) via Antonio Pallares (@ajpallares)
14-
* feat(checkpoints): Add the app's subscriber attributes as a rules dimension (#7443) via Rick (@rickvdl)
15-
* feat(checkpoints): Add date and record collection rules dimension values (#7442) via Rick (@rickvdl)
16-
* feat(Checkpoints): validate checkpoint identifiers (#7441) via Rick (@rickvdl)
17-
* Read the SDK API feed channel from the CI context (#7446) via Álvaro Brey (@AlvaroBrey)
18-
* Chore(deps): Bump fastlane-plugin-revenuecat_internal from `7fbbe66` to `7dd9ab9` (#7449) via dependabot[bot] (@dependabot[bot])
19-
* Add Scope plumbing and custom operator extension point (#7433) via Antonio Pallares (@ajpallares)
20-
* Announce a public API change in the SDK API feed once per PR (#7431) via Álvaro Brey (@AlvaroBrey)
18+
* Remove `@objc` from the new `confirmIn` purchase params (#7493) via Antonio Pallares (@ajpallares)
19+
* Add a transform entry point to the rules engine (#7486) via Antonio Pallares (@ajpallares)
20+
* Add nested variable rc.lower fixture case (#7484) via Antonio Pallares (@ajpallares)
21+
* [CI] Collapse the two check-api-changes jobs into one (#7476) via Antonio Pallares (@ajpallares)
22+
* Add rc.entries and rc.fromEntries custom operators (#7435) via Antonio Pallares (@ajpallares)
23+
* Raise an error for unresolved variables instead of degrading to null (#7460) via Antonio Pallares (@ajpallares)
24+
* Adopt shared Renovate config (#7485) via Álvaro Brey (@AlvaroBrey)
25+
* Add unwrapped rc.length fixture case (#7483) via Antonio Pallares (@ajpallares)
26+
* Add rc.split custom operator (#7473) via Antonio Pallares (@ajpallares)
27+
* Inject and refresh IAM tokens (#7440) via Dave DeLong (@davedelong)
28+
* Implement IAM Login Operations (#7439) via Dave DeLong (@davedelong)
29+
* HTTP Paths can change their absolute path based on IAM enablement (#7422) via Dave DeLong (@davedelong)
30+
* IAM Login part 2 (#7410) via Dave DeLong (@davedelong)
31+
* Fix Test run for watch and tvos (#7479) via Jacob Rakidzich (@JZDesign)
32+
* Bump sdks-common-config to 4.6.1 to cache the mise toolchain (#7478) via Antonio Pallares (@ajpallares)
33+
* Properly publish API modifications (no add/delete) in the SDK API feed (#7451) via Álvaro Brey (@AlvaroBrey)
34+
* Chore: Walk the workflow tree to broadcast prewarming data (#7420) via Jacob Rakidzich (@JZDesign)
35+
* Chore(Paywalls): Invoke the warmer from the coordinator (#7469) via Jacob Rakidzich (@JZDesign)
36+
* [CI] Build the nine platform swiftinterfaces in parallel (#6454) via Antonio Pallares (@ajpallares)
37+
* Fix(CI): Skip tests on unsupported os versions (#7477) via Jacob Rakidzich (@JZDesign)
38+
* Chore: Create WebBundleCachePrewarmer (#7429) via Jacob Rakidzich (@JZDesign)
39+
* Add rc.lower and rc.upper custom operators (#7436) via Antonio Pallares (@ajpallares)
40+
* Fix(CI): Correct type and add compiler check for old xcode version support (#7462) via Jacob Rakidzich (@JZDesign)
41+
* Chore: Signal purchases-ui on purchases configuration (#7407) via Jacob Rakidzich (@JZDesign)
42+
* Chore: Set up mechanism for WebView Caching (started with Clearing) (#7409) via Jacob Rakidzich (@JZDesign)
43+
* Rename the checkpoint event's `session_id` to `app_session_id` (#7459) via Cesar de la Vega (@vegaro)
44+
* Add rc.length operator for strings and arrays (#7437) via Antonio Pallares (@ajpallares)

CHANGELOG.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,49 @@
1+
## 5.86.0
2+
## RevenueCat SDK
3+
### ✨ New Features
4+
* feat: add confirmInScene & confirmInWindow purchase params (#4779) via Will Taylor (@fire-at-will)
5+
* feat: Expose displayName and originalPurchaseDate on NonSubscriptionTransaction (#7471) via Facundo Menzella (@facumenzella)
6+
* Track checkpoint hits through the analytics events pipeline (#7447) via Facundo Menzella (@facumenzella)
7+
8+
## RevenueCatUI SDK
9+
### Paywallsv2
10+
#### 🐞 Bugfixes
11+
* Remove already-subscribed logic from paywalls (#7487) via Antonio Pallares (@ajpallares)
12+
* fix(paywalls): render `product.offer_price` with the same currency format as other prices (#7270) via Cesar de la Vega (@vegaro)
13+
* Fix workflows ignoring `zero_decimal_place_countries` (#7474) via Cesar de la Vega (@vegaro)
14+
### Customer Center
15+
#### 🐞 Bugfixes
16+
* Fix Customer Center prices for subscriptions from different Apple IDs (#7427) via Cesar de la Vega (@vegaro)
17+
18+
### 🔄 Other Changes
19+
* Remove `@objc` from the new `confirmIn` purchase params (#7493) via Antonio Pallares (@ajpallares)
20+
* Add a transform entry point to the rules engine (#7486) via Antonio Pallares (@ajpallares)
21+
* Add nested variable rc.lower fixture case (#7484) via Antonio Pallares (@ajpallares)
22+
* [CI] Collapse the two check-api-changes jobs into one (#7476) via Antonio Pallares (@ajpallares)
23+
* Add rc.entries and rc.fromEntries custom operators (#7435) via Antonio Pallares (@ajpallares)
24+
* Raise an error for unresolved variables instead of degrading to null (#7460) via Antonio Pallares (@ajpallares)
25+
* Adopt shared Renovate config (#7485) via Álvaro Brey (@AlvaroBrey)
26+
* Add unwrapped rc.length fixture case (#7483) via Antonio Pallares (@ajpallares)
27+
* Add rc.split custom operator (#7473) via Antonio Pallares (@ajpallares)
28+
* Inject and refresh IAM tokens (#7440) via Dave DeLong (@davedelong)
29+
* Implement IAM Login Operations (#7439) via Dave DeLong (@davedelong)
30+
* HTTP Paths can change their absolute path based on IAM enablement (#7422) via Dave DeLong (@davedelong)
31+
* IAM Login part 2 (#7410) via Dave DeLong (@davedelong)
32+
* Fix Test run for watch and tvos (#7479) via Jacob Rakidzich (@JZDesign)
33+
* Bump sdks-common-config to 4.6.1 to cache the mise toolchain (#7478) via Antonio Pallares (@ajpallares)
34+
* Properly publish API modifications (no add/delete) in the SDK API feed (#7451) via Álvaro Brey (@AlvaroBrey)
35+
* Chore: Walk the workflow tree to broadcast prewarming data (#7420) via Jacob Rakidzich (@JZDesign)
36+
* Chore(Paywalls): Invoke the warmer from the coordinator (#7469) via Jacob Rakidzich (@JZDesign)
37+
* [CI] Build the nine platform swiftinterfaces in parallel (#6454) via Antonio Pallares (@ajpallares)
38+
* Fix(CI): Skip tests on unsupported os versions (#7477) via Jacob Rakidzich (@JZDesign)
39+
* Chore: Create WebBundleCachePrewarmer (#7429) via Jacob Rakidzich (@JZDesign)
40+
* Add rc.lower and rc.upper custom operators (#7436) via Antonio Pallares (@ajpallares)
41+
* Fix(CI): Correct type and add compiler check for old xcode version support (#7462) via Jacob Rakidzich (@JZDesign)
42+
* Chore: Signal purchases-ui on purchases configuration (#7407) via Jacob Rakidzich (@JZDesign)
43+
* Chore: Set up mechanism for WebView Caching (started with Clearing) (#7409) via Jacob Rakidzich (@JZDesign)
44+
* Rename the checkpoint event's `session_id` to `app_session_id` (#7459) via Cesar de la Vega (@vegaro)
45+
* Add rc.length operator for strings and arrays (#7437) via Antonio Pallares (@ajpallares)
46+
147
## 5.85.0
248
## RevenueCat SDK
349
### ✨ New Features

Examples/CheckpointTester/CheckpointTester/Sources/ContentView.swift

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ struct ContentView: View {
2222
@ObservedObject var model: CheckpointDemoModel
2323
@ObservedObject var analyticsTracker: GlobalCheckpointAnalyticsTracker
2424
@StateObject private var customVariables = CustomVariables()
25+
@State private var isSubscriberAttributeEditorPresented = false
2526

2627
var body: some View {
2728
TabView {
@@ -40,6 +41,10 @@ struct ContentView: View {
4041
Label("Listener", systemImage: "waveform.path.ecg")
4142
}
4243
}
44+
.sheet(isPresented: self.$isSubscriberAttributeEditorPresented) {
45+
SubscriberAttributeEditor()
46+
.presentationDetents([.medium])
47+
}
4348
.alert(
4449
isPresented: Binding(
4550
get: { self.model.outcomeAlert != nil },
@@ -156,6 +161,7 @@ struct ContentView: View {
156161

157162
}
158163
.navigationTitle("Checkpoint Tester")
164+
.subscriberAttributeToolbar(isPresented: self.$isSubscriberAttributeEditorPresented)
159165
}
160166
}
161167

@@ -187,6 +193,7 @@ struct ContentView: View {
187193
}
188194
}
189195
.navigationTitle("Custom variables")
196+
.subscriberAttributeToolbar(isPresented: self.$isSubscriberAttributeEditorPresented)
190197
}
191198
}
192199

@@ -219,6 +226,23 @@ struct ContentView: View {
219226
}
220227
}
221228
.navigationTitle("Global Listener")
229+
.subscriberAttributeToolbar(isPresented: self.$isSubscriberAttributeEditorPresented)
230+
}
231+
}
232+
233+
}
234+
235+
private extension View {
236+
237+
func subscriberAttributeToolbar(isPresented: Binding<Bool>) -> some View {
238+
self.toolbar {
239+
ToolbarItem(placement: .primaryAction) {
240+
Button {
241+
isPresented.wrappedValue = true
242+
} label: {
243+
Label("Set subscriber attribute", systemImage: "person.crop.circle.badge.plus")
244+
}
245+
}
222246
}
223247
}
224248

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
//
2+
// Copyright RevenueCat Inc. All Rights Reserved.
3+
//
4+
// Licensed under the MIT License (the "License");
5+
// you may not use this file except in compliance with the License.
6+
// You may obtain a copy of the License at
7+
//
8+
// https://opensource.org/licenses/MIT
9+
//
10+
// SubscriberAttributeEditor.swift
11+
//
12+
// Created by Rick van der Linden.
13+
//
14+
15+
import RevenueCat
16+
import SwiftUI
17+
18+
struct SubscriberAttributeEditor: View {
19+
20+
@Environment(\.dismiss) private var dismiss
21+
22+
@State private var key = ""
23+
@State private var value = ""
24+
25+
var body: some View {
26+
NavigationStack {
27+
Form {
28+
Section {
29+
TextField("Attribute key", text: self.$key)
30+
.textInputAutocapitalization(.never)
31+
.autocorrectionDisabled()
32+
TextField("Attribute value", text: self.$value)
33+
.textInputAutocapitalization(.never)
34+
} footer: {
35+
Text(
36+
"Subscriber attributes are part of checkpoint rule evaluation. " +
37+
"Changing one here can change which rule matches on the next checkpoint."
38+
)
39+
}
40+
}
41+
.navigationTitle("Subscriber attribute")
42+
.navigationBarTitleDisplayMode(.inline)
43+
.toolbar {
44+
ToolbarItemGroup(placement: .confirmationAction) {
45+
Button("Unset", role: .destructive) {
46+
self.updateAttribute(value: "")
47+
}
48+
.disabled(!self.hasKey)
49+
50+
Button("Set") {
51+
self.updateAttribute(value: self.value)
52+
}
53+
.disabled(!self.hasKey)
54+
}
55+
}
56+
}
57+
}
58+
59+
private var trimmedKey: String {
60+
return self.key.trimmingCharacters(in: .whitespacesAndNewlines)
61+
}
62+
63+
private var hasKey: Bool {
64+
return !self.trimmedKey.isEmpty
65+
}
66+
67+
private func updateAttribute(value: String) {
68+
Purchases.shared.attribution.setAttributes([self.trimmedKey: value])
69+
self.dismiss()
70+
}
71+
72+
}

Examples/CheckpointTester/README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,13 @@ The app demonstrates how application behavior can respond to checkpoint results:
1010
- completing an onboarding flow regardless of the checkpoint result;
1111
- skipping a checkpoint when `CustomerInfo` already contains an active entitlement;
1212
- exercising deterministic no-action and error results;
13+
- setting or unsetting subscriber attributes used by checkpoint rules;
1314
- editing custom checkpoint properties and displaying a live analytics event log.
1415

16+
Use the person button in any tab's navigation bar to set or unset one subscriber attribute. The attributes are
17+
part of the checkpoint rule evaluation scope, so this can change which rule matches without rebuilding the app.
18+
Unsetting passes an empty string, which is how the iOS SDK deletes an attribute.
19+
1520
The generated app shares PaywallsTester's bundle identifier and `Products.storekit` configuration so it can use
1621
the same local in-app purchase products and RevenueCat project.
1722

Examples/SampleCat/SampleCat.xcodeproj/project.pbxproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -531,7 +531,7 @@
531531
repositoryURL = "https://github.com/RevenueCat/purchases-ios";
532532
requirement = {
533533
kind = upToNextMajorVersion;
534-
minimumVersion = 5.85.0;
534+
minimumVersion = 5.86.0;
535535
};
536536
};
537537
/* End XCRemoteSwiftPackageReference section */

Package.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,6 @@ let package = Package(
127127
path: "RevenueCatUI",
128128
resources: [
129129
// Note: these have to match the values in RevenueCatUI.podspec
130-
.copy("Resources/background.jpg"),
131130
.process("Resources/icons.xcassets"),
132131
.process("Resources/Media.xcassets")
133132
],

Package@swift-5.8.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@ let package = Package(
7575
dependencies: ["RevenueCat"],
7676
path: "RevenueCatUI",
7777
resources: [
78-
.copy("Resources/background.jpg"),
7978
.process("Resources/icons.xcassets")
8079
]),
8180
.testTarget(name: "RevenueCatUITests",

RevenueCat.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 = "RevenueCat"
3-
s.version = "5.86.0-SNAPSHOT"
3+
s.version = "5.87.0-SNAPSHOT"
44
s.summary = "Subscription and in-app-purchase backend service."
55

66
s.description = <<-DESC

0 commit comments

Comments
 (0)