Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V4 #273

Draft
wants to merge 216 commits into
base: develop
Choose a base branch
from
Draft

V4 #273

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
216 commits
Select commit Hold shift + click to select a range
79f6358
Adds SuperCEL as a package
yusuftor Aug 9, 2024
14730a5
Merge branch 'develop' into feature/cel
yusuftor Aug 13, 2024
d3e90ce
Add SuperCEL to podspec
yusuftor Aug 13, 2024
8082f09
Adds CEL evaluation logic, still WIP
yusuftor Aug 14, 2024
d9b19ee
Merge branch 'develop' into feature/cel
yusuftor Aug 16, 2024
b3d39a9
Lots of changes for adding entitlements
yusuftor Aug 22, 2024
89b50cd
Changed delegate method
yusuftor Aug 23, 2024
98667e5
Fix some tests
yusuftor Aug 27, 2024
ed6b92e
Update EntitlementsInfo.swift
yusuftor Aug 27, 2024
fcfb395
Merge branch 'develop' into feature/cel
yusuftor Aug 27, 2024
f3682ed
Merge branch 'develop' into feature/entitlements
yusuftor Aug 27, 2024
dda6eee
Update CEL package
yusuftor Aug 27, 2024
f49e26a
Merge branch 'develop' into feature/entitlements
yusuftor Aug 27, 2024
9901c2d
Fix tests
yusuftor Aug 28, 2024
1a52cb0
Handles threadsafety for EntitlementsInfo
yusuftor Aug 30, 2024
227301d
Merge branch 'develop' into feature/cel
yusuftor Aug 30, 2024
1904385
Merge branch 'develop' into feature/entitlements
yusuftor Aug 30, 2024
d8a66e5
Fix tests
yusuftor Aug 30, 2024
8b3887a
Fixes some threading issues for entitlements
yusuftor Sep 2, 2024
bdbdf72
Update Objective-C example app
yusuftor Sep 2, 2024
9267817
Updated SwiftUI app
yusuftor Sep 2, 2024
efd5ea1
Adds `publishedActive` to entitlements
yusuftor Sep 3, 2024
a2c8247
Removed mention of subscription status
yusuftor Sep 3, 2024
539b9a5
Used publishedActive in example apps for auto-updating entitlements
yusuftor Sep 3, 2024
904fe26
Fix tests
yusuftor Sep 3, 2024
4179148
First pass of renaming
yusuftor Sep 4, 2024
575e495
Replaced more mentions of event with placement
yusuftor Sep 4, 2024
2b3360f
More conversion of events to placement
yusuftor Sep 5, 2024
f122548
Fix tests
yusuftor Sep 5, 2024
79f699a
Swiftlint fixes
yusuftor Sep 5, 2024
05119e8
Changes noRuleMatch to noAudienceMatch
yusuftor Sep 5, 2024
af8ddb2
Update CHANGELOG.md
yusuftor Sep 5, 2024
589fc5a
Fix example projects
yusuftor Sep 5, 2024
98a688a
Merge pull request #235 from superwall/feature/register-placement
yusuftor Sep 5, 2024
5d19a8e
Merge v4
yusuftor Sep 5, 2024
f563fd1
Fixes
yusuftor Sep 5, 2024
d3cf08a
Update TrackTests.swift
yusuftor Sep 5, 2024
c7a468b
Add CodingKey to Entitlement to match backend
yusuftor Sep 6, 2024
ed1d4b2
Added in type for entitlements and fixed tests
yusuftor Sep 6, 2024
debd6b9
Merge branch 'v4' into feature/cel
yusuftor Sep 6, 2024
f7c4ba6
Updated EvaluationContext, fixed tests
yusuftor Sep 6, 2024
09d3611
Update CHANGELOG.md
yusuftor Sep 6, 2024
e73ed5b
Include SuperCEL in Xcodegen project file
yusuftor Sep 6, 2024
2e4d3dd
Merge branch 'develop' into v4
yusuftor Sep 18, 2024
99ccab4
Removes isConfigured, fixes merge bugs
yusuftor Sep 18, 2024
0739753
Merge branch 'v4' into feature/entitlements
yusuftor Sep 18, 2024
1c96517
Merge branch 'develop' into feature/storekit-2-receipt
yusuftor Sep 19, 2024
9e92361
Merge branch 'develop' into v4
yusuftor Sep 20, 2024
90d272f
Merge branch 'develop' into v4
yusuftor Sep 24, 2024
2190919
Merge branch 'v4' into feature/storekit-2-receipt
yusuftor Sep 24, 2024
b2d6046
Adds SK2 purchasing, restoring, and listening
yusuftor Sep 24, 2024
46050f7
swiftlint fixes
yusuftor Sep 24, 2024
752437f
Fix tests
yusuftor Sep 24, 2024
f805cbf
Merge branch 'develop' into v4
yusuftor Sep 27, 2024
e292f50
Merge fixes
yusuftor Sep 27, 2024
2043a97
Merge branch 'v4' into feature/storekit-2-receipt
yusuftor Sep 27, 2024
63b7756
Merge branch 'v4' into feature/entitlements
yusuftor Sep 27, 2024
99108c8
Merge branch 'feature/entitlements' into feature/storekit-2-receipt
yusuftor Sep 27, 2024
62e8c87
Merge branch 'develop' into feature/storekit-2-receipt
yusuftor Oct 4, 2024
f35387f
Merge branch 'develop' into feature/storekit-2-receipt
yusuftor Oct 7, 2024
17f6fe2
Add SK2 support for purchase()
yusuftor Oct 7, 2024
1505be8
Add convenience initialiser for StoreProduct without entitlement
yusuftor Oct 8, 2024
4906c88
Formatting and documentation
yusuftor Oct 8, 2024
9adf224
Merge pull request #233 from superwall/feature/entitlements
yusuftor Oct 8, 2024
24dca64
Merge pull request #249 from superwall/feature/storekit-2-receipt
yusuftor Oct 8, 2024
6582916
Update Package.resolved
yusuftor Oct 8, 2024
5abd776
Merge branch 'v4' into feature/cel
yusuftor Oct 8, 2024
6f7a0a6
Add `PaywallResult` to onDismiss handler of `PaywallPresentationHandler`
yusuftor Oct 8, 2024
6c32d3d
Merge branch 'v4' into feature/cel
yusuftor Oct 8, 2024
8c4c58c
Merged changes from v4
yusuftor Oct 8, 2024
005f313
Connect up CEL from config to evaluator
yusuftor Oct 9, 2024
8cafb71
Fixed computed properties function
yusuftor Oct 10, 2024
2a4b9a8
Remove placeholder text
yusuftor Oct 10, 2024
62393ea
Merge branch 'develop' into v4
yusuftor Oct 14, 2024
a044c54
Merge fix
yusuftor Oct 14, 2024
b15ef4e
Merge branch 'v4' into feature/cel
yusuftor Oct 14, 2024
26a5646
Fixes for CEL and added tests
yusuftor Oct 15, 2024
da120e5
Moved the saving of active entitlements
yusuftor Oct 15, 2024
63a461e
Update for latest CEL package
yusuftor Oct 18, 2024
2e9d35c
Merge branch 'develop' into feature/cel
yusuftor Oct 21, 2024
d4f1dde
Fixes for merge
yusuftor Oct 21, 2024
eeed531
swiftlint fixes
yusuftor Oct 21, 2024
206b383
switching around available and storekit 2 check
yusuftor Oct 21, 2024
ca6cddf
Update Package.resolved
yusuftor Oct 21, 2024
2dc15c5
Change tests to run on latest mac
yusuftor Oct 21, 2024
ca2e107
Another compiler fix attempt
yusuftor Oct 21, 2024
62bd83f
Another fix attempt
yusuftor Oct 21, 2024
1f87708
Trying to fix receiptmanager again
yusuftor Oct 21, 2024
7f3f181
Update ReceiptManager.swift
yusuftor Oct 21, 2024
6536724
Update ReceiptManager.swift
yusuftor Oct 21, 2024
8e62435
Update to receiptmanager
yusuftor Oct 21, 2024
4c3c6fb
Pinned CEL to 0.1.9 revision
yusuftor Oct 21, 2024
11c7909
Pin CEL in podspec and xcodegen
yusuftor Oct 21, 2024
11fd02a
Update project.yml
yusuftor Oct 21, 2024
550dc1a
Updates SuperCEL package to Superscript
yusuftor Oct 22, 2024
5fa36eb
Update CHANGELOG.md
yusuftor Oct 22, 2024
7bb0f83
Updates to use latest superscript dependency
yusuftor Oct 22, 2024
054c103
Update tests.yml
yusuftor Oct 22, 2024
2f64692
Revert CI to latest Xcode, won't build otherwise
yusuftor Oct 22, 2024
07a1782
Merge pull request #236 from superwall/feature/cel
yusuftor Oct 22, 2024
d905b7a
Merge branch 'develop' into v4
yusuftor Oct 22, 2024
accecc8
Merge fixes
yusuftor Oct 22, 2024
0c2e4cd
Update CHANGELOG.md
yusuftor Oct 22, 2024
19ad3fe
Merge branch 'develop' into v4
yusuftor Oct 25, 2024
3845942
Merge fixes
yusuftor Oct 25, 2024
4df840a
Update entitlements
yusuftor Oct 25, 2024
f78467e
swiftlint fixes
yusuftor Oct 25, 2024
85ec46b
Update the entitlement API to use a status
yusuftor Oct 28, 2024
7599c36
Swiftlint fixes
yusuftor Oct 28, 2024
d76cafe
Update docs
yusuftor Oct 28, 2024
d0d04b2
Changed logic when waiting for config
yusuftor Oct 28, 2024
2fa1c8e
Update tests
yusuftor Oct 29, 2024
429a815
Merge pull request #260 from superwall/feature/entitlements-updates
yusuftor Oct 29, 2024
19e6c95
Update Package.resolved
yusuftor Oct 29, 2024
79e16ec
Merge branch 'v4' of https://github.com/superwall/Superwall-iOS into v4
yusuftor Oct 29, 2024
9a3704c
Merge branch 'develop' into v4
yusuftor Oct 31, 2024
6298424
Merge fixes
yusuftor Oct 31, 2024
d9932c2
Merge branch 'develop' into v4
yusuftor Nov 1, 2024
043b71c
Merge branch 'develop' into v4
yusuftor Nov 1, 2024
e15fe6f
Dependency container fixes
yusuftor Nov 1, 2024
17fca51
Merge branch 'develop' into v4
yusuftor Nov 11, 2024
273a4ce
Added from to entitlementStatusDidChange method
yusuftor Nov 11, 2024
3244c2f
Rename paywallTransactions logscope to transactions
yusuftor Nov 12, 2024
9e5e990
Merge branch 'develop' into v4
yusuftor Nov 12, 2024
123b582
Update SK2StoreProduct.swift
yusuftor Nov 15, 2024
e089dd1
Merge branch 'develop' into v4
yusuftor Nov 15, 2024
0a54102
Merge fixes
yusuftor Nov 16, 2024
1d538cb
Merge branch 'develop' into v4
yusuftor Nov 19, 2024
0a5156e
Merge branch 'develop' into v4
yusuftor Nov 19, 2024
61c76a7
Merge branch 'develop' into feature/sk2-observer-mode
yusuftor Nov 20, 2024
6715607
Adds fixes for SK2 observer mode
yusuftor Nov 21, 2024
6fcec7b
Update changelog
yusuftor Nov 21, 2024
74f3667
Fix tests
yusuftor Nov 21, 2024
2d0fd57
Merge branch 'develop' into feature/sk2-observer-mode
yusuftor Nov 21, 2024
2fad5dd
Update PaywallMessageHandlerTests.swift
yusuftor Nov 21, 2024
9b3034e
Merge pull request #270 from superwall/feature/sk2-observer-mode
yusuftor Nov 21, 2024
928b5df
Update Package.resolved
yusuftor Nov 21, 2024
7b71443
Merge branch 'develop' into v4
yusuftor Nov 22, 2024
b571b7a
Add type to transactionComplete event
yusuftor Nov 22, 2024
405d632
Merge branch 'develop' into v4
yusuftor Nov 22, 2024
aeb96b4
Forces objective-c configured SDK's storekit version to sk1
yusuftor Nov 26, 2024
38cc749
Removed transaction start for sk2 observer mode
yusuftor Nov 26, 2024
98410d4
Adds device.entitlementStatus
yusuftor Nov 26, 2024
f008f75
Update example apps with new apiKey
yusuftor Nov 26, 2024
9a735ff
Add semaphore to seed restoration
yusuftor Dec 3, 2024
a31acc9
Revert semaphore change
yusuftor Dec 3, 2024
f47071d
Adds `PaywallResult` to `PaywallView` `onRequestDismiss` block
yusuftor Dec 4, 2024
e2f0c9d
Update VerificationResult+Transaction.swift
yusuftor Dec 4, 2024
49f8d1d
Bug fix for backwards compatibility with v3 paywalls
yusuftor Dec 4, 2024
bb997b1
Changes objcConfigure
yusuftor Dec 5, 2024
7eab95f
Swap retrieving of config and entitlement status
yusuftor Dec 5, 2024
fe05c7f
Force SK1 for objc if observing purchases
yusuftor Dec 6, 2024
d931d4b
Trying to make the loadingStateDidChange optional for objc
yusuftor Dec 9, 2024
f259b60
Expose storekitVersion SuperwallOption to objc
yusuftor Dec 11, 2024
287d7d9
Make SK2 observer mode iOS 17.2+, await config on manual restore
yusuftor Dec 11, 2024
8bc1d7f
Extracts products from config rather than paywalls
yusuftor Dec 11, 2024
7630eda
Update Package.resolved
yusuftor Dec 11, 2024
daa36a4
Merge branch 'v4' into feature/change-example-apps
yusuftor Dec 11, 2024
aecf344
Make Product Equatable
yusuftor Dec 11, 2024
f582a76
Fix tests
yusuftor Dec 12, 2024
18d9037
Merge branch 'v4' into feature/change-example-apps
yusuftor Dec 12, 2024
fedf6bd
Updates example apps, adds products API
yusuftor Dec 16, 2024
3a5c1ea
Update changelog and comments
yusuftor Dec 16, 2024
0f99a99
swiftlint fix
yusuftor Dec 16, 2024
504b727
removed storefront from tests because wasn't picking up
yusuftor Dec 16, 2024
5e63c60
Merge pull request #276 from superwall/feature/change-example-apps
yusuftor Dec 16, 2024
7f233b2
Update xcodegen proj
yusuftor Dec 16, 2024
668be83
Update tests.yml
yusuftor Dec 16, 2024
71e89cf
Consolidate example apps into Basic and Advanced
yusuftor Dec 17, 2024
fd271a6
Test updates and removed some todos
yusuftor Dec 17, 2024
be08908
Update CELEvaluatorTests.swift
yusuftor Dec 17, 2024
cd2c080
Account for diff product types and add to test
yusuftor Dec 17, 2024
91f1713
Change name of example app
yusuftor Dec 17, 2024
4761c95
Update shouldFinishTransaction logic for SK2
yusuftor Dec 17, 2024
ec38174
Simplify some logic, add a log
yusuftor Dec 17, 2024
c707c99
Swiftlint fixes
yusuftor Dec 17, 2024
6b842ed
Adds activeProducts to device
yusuftor Dec 18, 2024
fcb0a48
Add github release workflow for v4 branch
yusuftor Dec 19, 2024
d043ecf
Updated superscript version in podspec
yusuftor Dec 19, 2024
b7c3507
Adds obsoleted attribute to more variants of register
yusuftor Dec 19, 2024
16743f0
Fix issue with optional product name
yusuftor Dec 19, 2024
ab019cc
Update CHANGELOG.md
yusuftor Dec 19, 2024
fa413b3
swiftlint fixes
yusuftor Dec 20, 2024
ea4334f
Merge pull request #277 from superwall/v4-develop
yusuftor Dec 20, 2024
cffa5f3
Bugfix for transaction and PaywallInfo data
yusuftor Jan 6, 2025
7cd761e
Merge branch 'v4-develop' into v4
yusuftor Jan 6, 2025
3a86b7b
Removes txn date checking for restorated vs purchased
yusuftor Jan 6, 2025
496cab9
Considers `SKIncludeConsumableInAppPurchaseHistory` for storekit value
yusuftor Jan 7, 2025
1d9493c
Merge branch 'develop' into v4-develop
yusuftor Jan 8, 2025
15c5156
visionOS fixes
yusuftor Jan 11, 2025
290ca2c
Merge branch 'develop' into v4-develop
yusuftor Jan 11, 2025
6b31fde
Change to beta 1
yusuftor Jan 12, 2025
c8132f7
Merge pull request #282 from superwall/v4-develop
yusuftor Jan 12, 2025
492b396
Fixes issue with bool cast as a number
yusuftor Jan 14, 2025
c7169c2
Rename `PaywallView(event:)` to `PaywallView(placement:)`
yusuftor Jan 15, 2025
e1fc16d
Stores the latest transaction for SK2 as fallback
yusuftor Jan 16, 2025
f528998
Doc fix
yusuftor Jan 16, 2025
d4b2690
Merge pull request #283 from superwall/v4-develop
yusuftor Jan 16, 2025
8cad571
Update version number
yusuftor Jan 16, 2025
1db3260
Merge branch 'v4' of https://github.com/superwall/Superwall-iOS into v4
yusuftor Jan 16, 2025
eb33eb6
Makes SK2ReceiptManager an actor
yusuftor Jan 23, 2025
265a982
Merge pull request #285 from superwall/v4-develop
yusuftor Jan 23, 2025
f18d5c4
Merge branch 'develop' into v4-develop
yusuftor Jan 29, 2025
b146a54
Replaces entitlements.status with subscriptionStatus
yusuftor Jan 29, 2025
b34cf12
Update CELEvaluatorTests.swift
yusuftor Jan 30, 2025
5d6a5d2
Merge branch 'develop' into v4-develop
yusuftor Jan 30, 2025
6a3da5e
fix tests and swiftlint
yusuftor Jan 30, 2025
b0b0e4e
Merge pull request #288 from superwall/v4-develop
yusuftor Jan 30, 2025
5a1f649
Update CHANGELOG.md
yusuftor Jan 30, 2025
64454fc
Removes the `restored` result from `PurchaseResult`
yusuftor Feb 5, 2025
3bf68a7
Merge pull request #290 from superwall/v4-develop
yusuftor Feb 5, 2025
4b04607
Fixes sk1 swift continuation leak when purchasing
yusuftor Feb 10, 2025
012f371
Merge branch 'develop' into v4-develop
yusuftor Feb 10, 2025
bab0eaa
Update PurchasingCoordinator.swift
yusuftor Feb 10, 2025
2c4dd2e
Update Package.resolved
yusuftor Feb 10, 2025
dfdf9d0
Merge pull request #292 from superwall/v4-develop
yusuftor Feb 10, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
71 changes: 71 additions & 0 deletions .github/workflows/tag-version-v4.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: TagVersion

on:
push:
branches: [ v4 ]

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
tag:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Tag
run: |
sudo git config --global user.name 'Jake'
sudo git config --global user.email '[email protected]'
sudo git pull
echo "\n\n\n- - - - - VERSION - - - - -\n\n\n"
sed -n 21p ./Sources/SuperwallKit/Misc/Constants.swift
echo "\n\n\n- - - - - END VERSION - - - - -\n\n\n"
sudo git tag -a $(sed -n 21p ./Sources/SuperwallKit/Misc/Constants.swift) -m "tags with latest version"
sudo git push --tags || true
sudo git checkout -b release/$(sed -n 21p ./Sources/SuperwallKit/Misc/Constants.swift)
sudo git push -u origin release/$(sed -n 21p ./Sources/SuperwallKit/Misc/Constants.swift)

cocoapods:
needs: tag
runs-on: macos-latest
steps:
- uses: actions/checkout@v1
- name: Publish to CocoaPod register
env:
COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }}
run: |
pod trunk push SuperwallKit.podspec --allow-warnings

slack:
runs-on: ubuntu-latest
needs: tag
steps:
- uses: actions/checkout@v3
- name: Parse version
id: version
run: |
VERSION=$(sed -n 21p ./Sources/SuperwallKit/Misc/Constants.swift)
echo "VERSION=$VERSION"
echo "::set-output name=prop::$VERSION"
- name: Determine prerelease status
id: prerelease
run: |
VERSION=${{steps.version.outputs.prop}}
if [[ "$VERSION" == *"-alpha"* || "$VERSION" == *"-beta"* || "$VERSION" == *"-rc"* ]]; then
echo "::set-output name=status::true"
else
echo "::set-output name=status::false"
fi

- name: slack-send
uses: slackapi/[email protected]
with:
payload: |
{
"text": "Please create a new iOS Release! https://github.com/superwall-me/Superwall-iOS/releases/new?tag=${{steps.version.outputs.prop}}&prerelease=${{steps.prerelease.outputs.status}}"
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }}
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK

9 changes: 3 additions & 6 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,13 @@ concurrency:

jobs:
run-tests:
runs-on: macos-13
runs-on: macos-latest

steps:
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: '14.3'
- name: Git Checkout
uses: actions/checkout@v3
- name: xcodegen
uses: xavierLowmiller/xcodegen-action@1.1.2
uses: xavierLowmiller/xcodegen-action@1.2.3
- name: Run Tests
run: |
xcodebuild -project SuperwallKit.xcodeproj -scheme SuperwallKit -sdk iphonesimulator -destination 'platform=iOS Simulator,OS=latest,name=iPhone 14 Pro' test
xcodebuild -project SuperwallKit.xcodeproj -scheme SuperwallKit -sdk iphonesimulator -destination 'platform=iOS Simulator,OS=latest,name=iPhone 15 Pro' test
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ xcuserdata/
DerivedData/
.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata
build/*
Examples/UIKit-ObjC/
113 changes: 113 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,119 @@

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

## 4.0.0-beta.7

### Fixes

- Fixes SK1 swift continuation leak when purchasing.

## 4.0.0-beta.6

### Breaking Changes

- Removes the `restored` result from `PurchaseResult`.

## 4.0.0-beta.5

### Breaking Changes

- Replaces `entitlements.status` with `subscriptionStatus`.
- `entitlementStatusDidChange` reverted to `subscriptionStatusDidChange`.
- `EntitlementStatus` removed in favor of `SubscriptionStatus`.

### Enhancements

- Adds `Superwall.shared.subscriptionStatus.isActive` as a convenience variable.

## 4.0.0-beta.4

### Fixes

- Fixes a crash that was caused by a concurrency issue.

## 4.0.0-beta.3

### Breaking Changes

- Renames `PaywallView(event:)` to `PaywallView(placement:)`.

### Fixes

- Adds extra check to get StoreKit 2 transaction data on `transaction_complete`.

## 4.0.0-beta.2

### Fixes

- Fixes an issue to do with audience filters.
- Re-adds unavailable functions from v3 to make the upgrade path smoother.

## 4.0.0-beta.1

### Fixes

- Removes date checking for transactions, which was resulting in some purchases being marked as restored.
- Checks for the `SKIncludeConsumableInAppPurchaseHistory` info.plist key. If set to `true`, defaults to using `.storeKit2` only if on iOS 18+.
- Fixes visionOS issues.

## 4.0.0-alpha.4

### Fixes

- Fixes bug for StoreKit version specified in a `transaction_complete` event.
- Reverts change of `presented_by_placement_name` to `presented_by_event_name` to fix campaign charts.

## 4.0.0-alpha.3

### Enhancements

- Adds the obsoleted attribute to more variants of `register(event:)` for a smoother upgrade path.

### Fixes

- Fixes issue with optional audience filter properties inside `PaywallInfo`.

## 4.0.0-alpha.2

### Breaking Changes

- Removes `trigger_session_id` from `PaywallInfo` params.
- `ProductInfo` is renamed to `Product` and the old `Product` class no longer exists.
- Removes `Superwall.shared.subscriptionStatus` in favor of entitlements.
- Removes `subscriptionStatus_didChange`.
- Removes `subscriptionStatusDidChange(to:)` from the `SuperwallDelegate`.
- Renames `productItems` to `products` in `PaywallInfo`.
- Renames `register(event:)` to `register(placement:)`. DONE
- Renames `preloadPaywalls(forEvents:)` to `preloadPaywalls(forPlacements:)`. DONE
- Renames `getPaywall(forEvent:)` to `getPaywall(forPlacement:)`. DONE
- Renames `getPresentationResult(forEvent:)` to `getPresentationResult(forPlacement:)`. DONE
- Renames the `TriggerResult`, `PresentationResult` and `PaywallSkippedReason` `eventNotFound` case to `placementNotFound` and `noEventMatch` to `noAudienceMatch`. DONE
- Renames `handleSuperwallEvent(withInfo:)` to `handleSuperwallPlacement(withInfo:). DONE
- Moves `ComputedPropertyRequestType` to be a top-level type.
- Renames `Store` to `ProductStore`.
- Removes `Superwall.shared.isConfigured` in favor of `Superwall.shared.configurationStatus`.
- Defaults to StoreKit 2 for product purchasing for apps running on iOS 15+. You can change this back to StoreKit 1 by setting the `SuperwallOption` `storeKitVersion` to `.storeKit1`. When using Objective-C and providing a PurchaseController or using observer mode, the SDK will default to `.storeKit1`. If you're using Objective-C and using `purchase(_:)`, you must use `.storeKit1`.
- Changes the `PurchaseController` purchase function to `func purchase(product: StoreProduct) async -> PurchaseResult`. There will be an StoreKit 2 product accessible via `product.sk2Product` by default. However, if you're using the StoreKit 1 `SuperwallOption` or your app is running on an iOS version lower than iOS 15, this will be `nil` and you can access the StoreKit 1 product via `product.sk1Product`. DONE
- Consumables no longer count as lifetime subscriptions when using StoreKit 2. REVISIT
- Renames the `PurchaseResult` case `purchased(productId: String)` to `purchased(Product)`.
- Changes the Swift `onDismiss` block of the `PaywallPresentationHandler` to accept both a `PaywallInfo` object and a `PaywallResult` object so you know which product was purchased after dismiss.
- Changes the `onRequestDismiss` block of the `PaywallView` to accept both a `PaywallInfo` object and a `PaywallResult` object.
- Changes the Objective-C `onDismiss` block of the `PaywallPresentationHandler` to accept both a `PaywallInfo` object, a `PaywallResult` object, and an optional `StoreProduct`, so you know which product was purchased after dismiss.
- Renames `LogScope` case `paywallTransactions` to `transactions`.
- Adds `type` to the `transactionComplete` placement.

### Enhancements

- Adds `purchase(_:)` support for both StoreKit 2 products and `StoreProduct`.
- Adds `Superwall.shared.entitlements`. This is a published property of type `EntitlementStatus`. If you're using Combine or SwiftUI, you can listen to this to receive updates whenever it changes. Otherwise, you can use the `SuperwallDelegate` method `entitlementStatusDidChange(from:to:)`. If you're not using a `PurchaseController`, we will handle the entitlements for you depending on what products the user purchases. However, if you're using a `PurchaseControler`, you can set the entitlement status, which can be `.unknown`, `.inactive`, or `.active(Set<Entitlement>)`. You can also access `all`, `active` and `inactive` entitlements from the entitlements object.
- Adds `getStatus()`, `setUnknownStatus()`, `setInactiveStatus()`, and `setActiveStatus(with:)` on `Superwall.shared.entitlements` for Objective-C users.
- Tracks an `entitlementStatus_didChange` event whenever the entitlement status changes.
- Updates the example apps. We now have Basic and Advanced. Basic is a simple plug-and-play superwall setup that doesn't use entitlements. Advanced uses entitlements and has three possible ways of configuring Superwall: 1. Letting Superwall manage everything, 2. Using a purchase controller with StoreKit, 2. Using a purchase controller with RevenueCat.
- Uses `Superscript` for all audience filter evaluations. This is our in-house package that uses Google's Common Expression Language to evaluate audience filters. It allows for complex expressions within the audience filter builder.
- Adds the `LogScope` case `entitlements`.
- Adds StoreKit 2 observer mode. This can be enabled by setting the `SuperwallOptions` `shouldObservePurchases` to `true` and `storeKitVersion` to `.storeKit2` (which is the default value). Note that this is only available with apps running iOS 17.2+.
- Adds `products(for:)` which gets the ``StoreProduct`s for given product identifiers.

## 3.12.5

### Fixes
Expand Down
Loading
Loading