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

[Feature] Request to Dynamically Fetch hCaptcha HTML Instead of Including it in the Stripe iOS SDK #3959

Open
jesus-mg-ios opened this issue Aug 26, 2024 · 3 comments
Labels
kind:improvement triaged Issue has been reviewed by Stripe and is being tracked internally

Comments

@jesus-mg-ios
Copy link

jesus-mg-ios commented Aug 26, 2024

Hi Stripe Team,

I noticed that the Stripe iOS SDK includes the hCaptcha HTML directly in the source file HCaptchaHtml.swift.

Describe the solution you'd like

I would like to suggest an improvement: instead of embedding the hCaptcha HTML directly in the SDK, consider fetching it dynamically from the network when needed.
Here are a few reasons why this approach would be beneficial:

Reduced SDK Size: By not including the hCaptcha HTML directly in the SDK, the overall size of the SDK can be reduced. This would help developers keep their apps more lightweight and efficient.
Easier Updates and Maintenance: Fetching the hCaptcha HTML dynamically allows for easier updates and maintenance. If there are any changes or updates to hCaptcha, they can be made server-side without requiring an update to the SDK, ensuring users always have the latest version.

Describe alternatives you've considered

Additional context

@davidme-stripe davidme-stripe added the triaged Issue has been reviewed by Stripe and is being tracked internally label Sep 17, 2024
@davidme-stripe
Copy link
Contributor

Thanks for the suggestion! This is per hCaptcha's recommendation, and it adds ~13kb to the uncompressed app size. We'll consider this for a future update.

@jesus-mg-ios
Copy link
Author

@davidme-stripe the url is private. Thanks in advance

@jesus-mg-ios
Copy link
Author

jesus-mg-ios commented Sep 17, 2024

Also there are some jsons like au_becs_bsb.json and localized_address_data.json that inside asset.car can reduce the binary size. Even you can play with the compression type in the inspector panel when you include it in assets.

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

No branches or pull requests

2 participants