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

[BUG] Size of the Product / Module StripeApplePay has incremented significantly #3548

Closed
uguizu opened this issue Apr 30, 2024 · 3 comments
Closed
Labels
kind:bug triaged Issue has been reviewed by Stripe and is being tracked internally

Comments

@uguizu
Copy link

uguizu commented Apr 30, 2024

Summary

From version 23.27.0 and 23.27.1 the size of the StripeApplePay, the size of the binary increases a couples of MB, making the module unusable for App Clips

Code to reproduce

NONE - Only installing the SDK

iOS version

iOS 17.0 and onwards

Installation method

SPM

SDK version

23.27.1

Other information

Tool that I use to measure:

Swift Package Info
https://github.com/marinofelipe/swift-package-info

And the results are:

Version 23.27.0

+------------------------------------------------+
|               Swift Package Info               |
|                                                |
|             StripeApplePay, 23.27.0            |
+--------------+---------------------------------+
| Provider     | Results                         |
+--------------+---------------------------------+
| Binary Size  | Binary size increases by 1.2 MB |
| Platforms    | ios from v. 13.0                |
| Dependencies | No third-party dependencies :)  |
+--------------+---------------------------------+

Version 23.27.1

+-----------------------------------------------+
|              Swift Package Info               |
|                                               |
|            StripeApplePay, 23.27.1            |
+--------------+--------------------------------+
| Provider     | Results                        |
+--------------+--------------------------------+
| Binary Size  | Binary size increases by 4 MB  |
| Platforms    | ios from v. 13.0               |
| Dependencies | No third-party dependencies :) |
+--------------+--------------------------------+

Note:

Even thou I know that is not an official tool by any sorts, I have used this tool and is consistent with the behavior that I see in the size of the binaries published in Testflight. (Obviously the change is not that drastic, but just 1 more MB can be a detriment to an AppClip).

@davidme-stripe
Copy link
Contributor

Hello, thanks for filing this! It looks like we added some new use of async/await, which caused Xcode to bundle libswift_Concurrency.dylib when an app is targeting iOS 14.0 or earlier. Our framework size scripts were using iOS 14.5, so we missed the size impact of this change. We'll move the offending code, sorry for the trouble!

Out of curiosity, would it be possible to set your App Clip's minimum target OS to 14.5 or later? We may want to use async/await in the future, but we don't want to break any existing users.

@uguizu
Copy link
Author

uguizu commented Apr 30, 2024

@davidme-stripe Thanks for the response and the help.

And yeah I almost sure it would be possible to bump up, thanks for the helps and excited for the changes then.

As side note, at the moment we are going to use keep using the version 23.27.0 that solves our use cases.

@davidme-stripe davidme-stripe added the triaged Issue has been reviewed by Stripe and is being tracked internally label Apr 30, 2024
davidme-stripe added a commit that referenced this issue Apr 30, 2024
## Summary
This contains async/await code, which was causing StripeApplePay to pull
in the Swift Concurrency libraries on iOS 14.0 or earlier. Move it to
StripePaymentSheet, as it isn't used by other frameworks.

## Motivation
#3548

## Testing
`swift-package-info binary-size --local-path . --product StripeApplePay`

## Changelog
Will add
@davidme-stripe
Copy link
Contributor

Should be fixed in 23.27.2, let us know if you're still seeing issues with the SDK size!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind:bug triaged Issue has been reviewed by Stripe and is being tracked internally
Projects
None yet
Development

No branches or pull requests

2 participants