Skip to content

Commit bb70922

Browse files
authored
Merge pull request #299 from superwall/develop
4.0.2
2 parents 10645b1 + baee013 commit bb70922

File tree

85 files changed

+1745
-1031
lines changed

Some content is hidden

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

85 files changed

+1745
-1031
lines changed

.github/workflows/tests.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,15 @@ concurrency:
1515

1616
jobs:
1717
run-tests:
18-
runs-on: macos-latest
18+
runs-on: macos-15
1919

2020
steps:
2121
- name: Git Checkout
2222
uses: actions/checkout@v3
23+
- name: Select Xcode 16.2
24+
run: sudo xcode-select -switch /Applications/Xcode_16.2.app
2325
- name: xcodegen
2426
uses: xavierLowmiller/xcodegen-action@1.2.3
2527
- name: Run Tests
2628
run: |
27-
xcodebuild -project SuperwallKit.xcodeproj -scheme SuperwallKit -sdk iphonesimulator -destination 'platform=iOS Simulator,OS=latest,name=iPhone 15 Pro' test
29+
xcodebuild -project SuperwallKit.xcodeproj -scheme SuperwallKit -sdk iphonesimulator -destination 'platform=iOS Simulator,OS=latest,name=iPhone 16 Pro' test

CHANGELOG.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,22 @@
22

33
The changelog for `SuperwallKit`. Also see the [releases](https://github.com/superwall/Superwall-iOS/releases) on GitHub.
44

5+
## 4.0.2
6+
7+
### Enhancements
8+
9+
- Adds `$storekitVersion`, `$maxConfigRetryCount`, and `$shouldObservePurchases` to the `config_attributes` event.
10+
- Updates Superscript to 0.1.18.
11+
- Confirms all paywall assignments locally to reduce the amount of preloading of paywalls on each cold app open.
12+
- Migrates documents used for user and app data out of the documents folder and into the application support folder.
13+
- If the SDK is using StoreKit 2 and not using a purchase controller, a refunded purchase is no longer considered active and therefore does not give the user an active entitlement.
14+
15+
### Fixes
16+
17+
- Deprecates the naming of `handleSuperwallPlacement(withInfo:)` back to `handleSuperwallEvent(withInfo:)`.
18+
- Deprecates `SuperwallPlacement` back to `SuperwallEvent`.
19+
- Deprecates `SuperwallPlacementInfo` back to `SuperwallEventInfo`.
20+
521
## 4.0.1
622

723
### Fixes

Examples/Advanced/Advanced.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ let package = Package(
1818
)
1919
],
2020
dependencies: [
21-
.package(url: "https://github.com/superwall/Superscript-iOS", .exact("0.1.17"))
21+
.package(url: "https://github.com/superwall/Superscript-iOS", .exact("0.1.18"))
2222
],
2323
targets: [
2424
// Targets are the basic building blocks of a package. A target can define a module or a test suite.

Sources/SuperwallKit/Analytics/Ad Attribution/AttributionPoster.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ final class AttributionPoster {
3030
return nil
3131
}
3232

33-
await Superwall.shared.track(InternalSuperwallPlacement.AdServicesTokenRetrieval(state: .start))
33+
await Superwall.shared.track(InternalSuperwallEvent.AdServicesTokenRetrieval(state: .start))
3434
return try await attributionFetcher.adServicesToken
3535
#endif
3636
}
@@ -114,14 +114,14 @@ final class AttributionPoster {
114114
storage.save(token, forType: AdServicesTokenStorage.self)
115115

116116
await Superwall.shared.track(
117-
InternalSuperwallPlacement.AdServicesTokenRetrieval(state: .complete(token))
117+
InternalSuperwallEvent.AdServicesTokenRetrieval(state: .complete(token))
118118
)
119119

120120
let data = await network.sendToken(token)
121121
Superwall.shared.setUserAttributes(data)
122122
} catch {
123123
await Superwall.shared.track(
124-
InternalSuperwallPlacement.AdServicesTokenRetrieval(state: .fail(error))
124+
InternalSuperwallEvent.AdServicesTokenRetrieval(state: .fail(error))
125125
)
126126
}
127127
}

Sources/SuperwallKit/Analytics/App Session/AppSessionManager.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ class AppSessionManager {
8383
@objc private func applicationWillResignActive() {
8484
storage.recordFirstSessionTracked()
8585
Task {
86-
await Superwall.shared.track(InternalSuperwallPlacement.AppClose())
86+
await Superwall.shared.track(InternalSuperwallEvent.AppClose())
8787
}
8888
lastAppClose = Date()
8989
appSession.endAt = Date()
@@ -95,7 +95,7 @@ class AppSessionManager {
9595

9696
@objc private func applicationDidBecomeActive() {
9797
Task {
98-
await Superwall.shared.track(InternalSuperwallPlacement.AppOpen())
98+
await Superwall.shared.track(InternalSuperwallEvent.AppOpen())
9999
await sessionCouldRefresh()
100100
}
101101
}
@@ -129,7 +129,7 @@ class AppSessionManager {
129129
return
130130
}
131131
group.addTask {
132-
await Superwall.shared.track(InternalSuperwallPlacement.SessionStart())
132+
await Superwall.shared.track(InternalSuperwallEvent.SessionStart())
133133
}
134134

135135
// Only track device attributes if we've already tracked app launch before.
@@ -138,7 +138,7 @@ class AppSessionManager {
138138
if self.didTrackAppLaunch {
139139
group.addTask {
140140
await Superwall.shared.track(
141-
InternalSuperwallPlacement.DeviceAttributes(deviceAttributes: deviceAttributes)
141+
InternalSuperwallEvent.DeviceAttributes(deviceAttributes: deviceAttributes)
142142
)
143143
}
144144

@@ -160,7 +160,7 @@ class AppSessionManager {
160160
if didTrackAppLaunch {
161161
return
162162
}
163-
await Superwall.shared.track(InternalSuperwallPlacement.AppLaunch())
163+
await Superwall.shared.track(InternalSuperwallEvent.AppLaunch())
164164
didTrackAppLaunch = true
165165
}
166166
}

Sources/SuperwallKit/Analytics/Internal Tracking/Trackable Events/Trackable.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import Foundation
1111
protocol Trackable {
1212
/// The string representation of the name.
1313
///
14-
/// For a `TrackableSuperwallPlacement`, this is the raw value of an ``SuperwallPlacement`` assigned to it.
14+
/// For a `TrackableSuperwallEvent`, this is the raw value of a ``SuperwallEvent`` assigned to it.
1515
var rawName: String { get }
1616
/// Parameters that can be used in audience filters. Do not include $ signs in parameter names as they will be dropped.
1717
var audienceFilterParams: [String: Any] { get }

0 commit comments

Comments
 (0)