-
Notifications
You must be signed in to change notification settings - Fork 1k
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
[1/2] Swift Concurrency migration - Financial Connections API client #4444
base: master
Are you sure you want to change the base?
Conversation
8 builds increased size
StripeSize 1.0 (1)
|
Item | Install Size Change |
---|---|
Other | ⬆️ 100 B |
StripePaymentsSize 1.0 (1)
com.stripe.StripePaymentsSize
⚖️ Compare build
⏱️ Analyze build performance
Total install size change: ⬆️ 100 B
Total download size change: ⬇️ 159 B (-0.01%)
Largest size changes
Item | Install Size Change |
---|---|
Other | ⬆️ 100 B |
StripePaymentsUISize 1.0 (1)
com.stripe.StripePaymentsUISize
⚖️ Compare build
⏱️ Analyze build performance
Total install size change: ⬆️ 100 B
Total download size change: ⬆️ 306 B (0.02%)
Largest size changes
Item | Install Size Change |
---|---|
Other | ⬆️ 100 B |
StripePaymentSheetSize 1.0 (1)
com.stripe.StripePaymentSheetSize
⚖️ Compare build
⏱️ Analyze build performance
Total install size change: ⬆️ 476 B
Total download size change: ⬆️ 527 B (0.01%)
Largest size changes
Item | Install Size Change |
---|---|
Other | ⬆️ 476 B |
StripeIdentitySize 1.0 (1)
com.stripe.StripeIdentitySize
⚖️ Compare build
⏱️ Analyze build performance
Total install size change: ⬆️ 100 B
Total download size change: ⬇️ 66 B
Largest size changes
Item | Install Size Change |
---|---|
Other | ⬆️ 100 B |
StripeApplePaySize 1.0 (1)
com.stripe.StripeApplePaySize
⚖️ Compare build
⏱️ Analyze build performance
Total install size change: ⬆️ 100 B
Total download size change: ⬆️ 158 B (0.03%)
Largest size changes
Item | Install Size Change |
---|---|
Other | ⬆️ 100 B |
StripeFinancialConnectionsSize 1.0 (1)
com.stripe.StripeFinancialConnectionsSize
⚖️ Compare build
⏱️ Analyze build performance
Total install size change: ⬆️ 197.0 kB (4.43%)
Total download size change: ⬆️ 67.0 kB (4.84%)
Largest size changes
Item | Install Size Change |
---|---|
Code Signature | ⬆️ 4.7 kB |
🗑 StripeFinancialConnections.NativeFlowAPIDataManager.manifest | ⬇️ -2.0 kB |
StripeFinancialConnections.NativeFlowAPIDataManager.init(manifest... | ⬇️ -1.8 kB |
StripeFinancialConnectionsSize | ⬆️ 1.3 kB |
StripeFinancialConnections.PartnerAuthViewController.handleAuthSe... | ⬆️ 1.2 kB |
StripeConnectSize 1.0 (1)
com.stripe.StripeConnectSize
⚖️ Compare build
⏱️ Analyze build performance
Total install size change: ⬆️ 193.6 kB (3.91%)
Total download size change: ⬆️ 67.5 kB (4.37%)
Largest size changes
Item | Install Size Change |
---|---|
Code Signature | ⬆️ 5.4 kB |
🗑 StripeFinancialConnections.NativeFlowAPIDataManager.manifest | ⬇️ -2.0 kB |
StripeFinancialConnections.NativeFlowAPIDataManager.init(manifest... | ⬇️ -1.8 kB |
StripeConnectSize | ⬆️ 1.3 kB |
StripeFinancialConnections.PartnerAuthViewController.handleAuthSe... | ⬆️ 1.2 kB |
🛸 Powered by Emerge Tools
Comment trigger: Size diff threshold of 100.00kB exceeded
🚨 New dead code detected in this PR: FinancialConnectionsAsyncAPIClient.swift:144 warning: Protocol 'FinancialConnectionsAsyncAPI' is redundant as it's never used as an existential type
FinancialConnectionsAsyncAPIClient.swift:316 warning: Protocol 'FinancialConnectionsAsyncAPI' conformance is redundant Please remove the dead code before merging. If this is intentional, you can bypass this check by adding the label ℹ️ If this comment appears to be left in error, double check that the flagged code is actually used and/or make sure your branch is up-to-date with |
Summary
This PR introduces Swift Concurrency to the Financial Connections API client, laying the groundwork for a full migration. The changes are implemented in a way that allows for a gradual rollout without disrupting existing functionality. To do this seamlessly, we introduce two new classes;
FinancialConnectionsAsyncAPIClient
: A new API client fully powered by Swift Concurrency.FinancialConnectionsAPIClientFacade
: A wrapper that encapsulates both the new async client and the existing Futures/Promises-based client.Some implementation details:
FinancialConnectionsAPI
protocol, maintaining the current interface for SDK consumers.This work also provides a shape for the new async API. The current API is shaped as:
While the new API is shaped as:
A toggle has been added to the FC example app to switch between API client implementations. This is currently the only way to test the async API client:
Motivation
Move towards migration to Swift Concurrency
Next Steps: Part 2 will focus on migrating existing consumers to use the new async API client.
Testing
Unit tests added, and manual testing done.
Screen.Recording.2025-01-08.at.1.47.18.PM.mov
Changelog
N/a