-
Notifications
You must be signed in to change notification settings - Fork 58
Customer Center #509
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
Open
DreamingInBinary
wants to merge
41
commits into
develop
Choose a base branch
from
customer-management-portal
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Customer Center #509
Changes from all commits
Commits
Show all changes
41 commits
Select commit
Hold shift + click to select a range
4a76c2c
feat(customer-center): add CustomerCenterConfiguration model and Supe…
DreamingInBinary ed2929e
feat(customer-center): add CustomerCenterAction, refund status, ObjC …
DreamingInBinary 7d57865
feat(customer-center): add Customer Center analytics events
DreamingInBinary 77beedd
feat(customer-center): add AppVersionComparator
DreamingInBinary 2c9a973
feat(customer-center): add SupportEmailComposer
DreamingInBinary 8bb052b
feat(customer-center): add PurchasePresentation model and builder
DreamingInBinary 8065120
feat(customer-center): add CustomerCenterPathResolver
DreamingInBinary c89bd2e
feat(customer-center): add StoreKit transaction lookup
DreamingInBinary 722772d
feat(customer-center): add localized strings
DreamingInBinary 6f63e9a
feat(customer-center): add view-model dependencies and live adapters
DreamingInBinary d3dea04
feat(customer-center): add CustomerCenterViewModel
DreamingInBinary 79feed6
feat(customer-center): add core SwiftUI views and StoreKit sheets
DreamingInBinary 3616997
feat(customer-center): add survey, history, account, update, duplicat…
DreamingInBinary 1f070fc
feat(customer-center): add delegate protocols and UIKit view controller
DreamingInBinary 91f3e89
feat(customer-center): add CustomerCenterManager and Superwall.presen…
DreamingInBinary 412a10f
fix(customer-center): lazily create CustomerCenterManager on the main…
DreamingInBinary 2dc9837
feat(customer-center): add SwiftUI presentation and callback modifiers
DreamingInBinary 417e0a2
feat(customer-center): examples, docs, changelog
DreamingInBinary 52e4f98
fix(customer-center): final review fixes — dedupe renewals, sheet han…
DreamingInBinary b2244d9
refactor(customer-center): rename noActiveScreen to noPurchasesScreen
DreamingInBinary 9b19ab3
revert(customer-center): restore authorship headers on unrelated files
DreamingInBinary e8b454f
fix(customer-center): rename the SwiftUI modifier to presentSuperwall…
DreamingInBinary 23559e3
fix(customer-center): label the cancel path "Cancel subscription"
DreamingInBinary 4558419
fix(customer-center): stop the manage-subscriptions sheet being dropped
DreamingInBinary 2ee92f9
fix(customer-center): drop the disclosure chevron from action rows
DreamingInBinary 6473567
fix(customer-center): stop the SDK restore alert doubling with the Cu…
DreamingInBinary 6a1e1c9
fix(customer-center): animate the update banner's dismissal
DreamingInBinary 12155dc
fix(customer-center): fire didDismiss from a visibility count, not th…
DreamingInBinary 2001d65
fix(customer-center): widen the dismissal debounce past a nav transition
DreamingInBinary 8c763af
chore(release): bump version to 4.17.0
yusuftor 97702aa
fix(customer-center): review fixes — dismissal delivery, locale, diag…
yusuftor 7ab4a98
test: run the suite in parallel with per-instance cache isolation
yusuftor 712eee1
fix(customer-center): stop hiding purchases the user cannot reach
DreamingInBinary a5b8fc1
feat(customer-center): support pushing onto a navigation stack
DreamingInBinary 28691d5
fix(customer-center): close the review gaps in the pushed presentatio…
DreamingInBinary 0b90c4d
feat(customer-center): look the latest app version up from the App Store
DreamingInBinary baa2a95
docs(customer-center): record the phased-release limitation
DreamingInBinary d75c8ce
fix(customer-center): make the web subscription path make sense
DreamingInBinary 64f2464
feat(customer-center): show prices for web purchases
DreamingInBinary 1ef95b4
feat(customer-center): read a title out of the product identifier
DreamingInBinary 83bd0e4
refactor(customer-center): read a web product's name instead of inven…
DreamingInBinary File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
Examples/Advanced/Advanced/CustomerCenterExampleDelegate.swift
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| // | ||
| // CustomerCenterExampleDelegate.swift | ||
| // Advanced | ||
| // | ||
| // Created by Claude on 20/08/2026. | ||
| // | ||
|
|
||
| import Foundation | ||
| import SuperwallKit | ||
|
|
||
| /// An example `CustomerCenterDelegate` that prints each callback it receives. | ||
| /// | ||
| /// `Superwall.shared.presentCustomerCenter(delegate:)` retains this for the duration of the | ||
| /// presentation, so it's safe to create a fresh instance each time you present. | ||
| final class CustomerCenterExampleDelegate: CustomerCenterDelegate { | ||
| func customerCenter(shouldRestorePurchases resume: @escaping (Bool) -> Void) { | ||
| print("[Customer Center] shouldRestorePurchases") | ||
| resume(true) | ||
| } | ||
|
|
||
| func customerCenter(didSelect action: CustomerCenterAction, for purchase: SubscriptionTransaction?) { | ||
| print("[Customer Center] didSelect action: \(action), purchase: \(String(describing: purchase))") | ||
| } | ||
|
|
||
| func customerCenter(didCompleteSurvey surveyId: String, optionId: String, for action: CustomerCenterAction) { | ||
| print("[Customer Center] didCompleteSurvey: \(surveyId), optionId: \(optionId), action: \(action)") | ||
| } | ||
|
|
||
| func customerCenter(didCompleteRefundRequestFor productId: String, status: CustomerCenterRefundStatus) { | ||
| print("[Customer Center] didCompleteRefundRequestFor: \(productId), status: \(status)") | ||
| } | ||
|
|
||
| func customerCenterDidDismiss() { | ||
| print("[Customer Center] didDismiss") | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
Sources/SuperwallKit/CustomerCenter/Actions/StoreKitTransactionLookup.swift
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| // | ||
| // StoreKitTransactionLookup.swift | ||
| // SuperwallKit | ||
| // | ||
| // Created by Jordan Morgan on 20/08/2026. | ||
| // | ||
|
|
||
| import Foundation | ||
| import StoreKit | ||
|
|
||
| protocol StoreKitTransactionLooking: Sendable { | ||
| func latestTransactionID(for productId: String) async -> UInt64? | ||
| func isFamilyShared(productId: String) async -> Bool | ||
| } | ||
|
|
||
| @available(iOS 15.0, *) | ||
| struct StoreKitTransactionLookup: StoreKitTransactionLooking { | ||
| func latestTransactionID(for productId: String) async -> UInt64? { | ||
| guard case .verified(let transaction)? = await Transaction.latest(for: productId) else { | ||
| return nil | ||
| } | ||
| return transaction.id | ||
| } | ||
|
|
||
| func isFamilyShared(productId: String) async -> Bool { | ||
| guard case .verified(let transaction)? = await Transaction.latest(for: productId) else { | ||
| return false | ||
| } | ||
| return transaction.ownershipType == .familyShared | ||
| } | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These four entries sit under
### Fixesin the same release whose### Enhancementsintroduces the Customer Center, so they read as fixes to a feature nobody has shipped against. The second one is also inaccurate:environment.localeresolves toDeviceHelper.preferredLocaleIdentifier, which isLocale.preferredLanguages.first— the device language — notSuperwallOptions.localeIdentifier, so setting that option still changes neither the dates nor the strings.