plaid / plaid-link-ios

Plaid Link iOS SDK
https://plaid.com/docs/link/ios
MIT License
133 stars 88 forks source link

SPM loading extremely slow #36

Closed kamirana4 closed 3 weeks ago

kamirana4 commented 5 months ago

A detailed description of the steps to reproduce the issue

I haven't faced soo slow package loading ever for any other library where its been 2 hours and the package progress keeps on reseting once it reaches 11%.

What you expected to see?

SPM package should resolve in minutes. It depends on internet connection speed but i have million other projects using countless dependencies but no one stuck's this bad.

What you saw instead?

Package not resolving. Name Plaid Link iOS Value v5.3.2
Link env
LinkKit version 5.3.2
iOS version
iOS device
kamirana4 commented 5 months ago

These sample apps should never be the part of SPM package. Same for cocoapods related stuff. Please cleanup all of this so that the package has only LinkKit framework and configuration file.

Screenshot 2024-03-30 at 4 39 49 AM
dtroupe-plaid commented 5 months ago

I haven't faced soo slow package loading ever for any other library where its been 2 hours and the package progress keeps on reseting once it reaches 11%.

Nothing fundamental has changed with our swift package in a long time. In fact the size of LinkKit has been significantly reduced over the last year. I don't think the problem you're experiencing is related to anything in our SDK.

kenanmamedoff commented 3 months ago

It is actually really slow.

kamirana4 commented 3 months ago

@kenanmamedoff The SPM actually doesn't work. Its better to download the framework as add it directly.

waitbutY commented 2 months ago

Our project includes 35-40 packages, and Plaid is the slowest to resolve by a factor of 3-4. It takes a huge amount of time to resolve (sometimes 10, 15, 20 minutes)

Other repositories offer an SPM specific option, see Lottie: https://github.com/airbnb/lottie-spm

Can this issue be reopened with the creation of an SPM specific repo as the solution?

dtroupe-plaid commented 2 months ago

@waitbutY thanks for suggesting a solution - this appears to be an SPM Issue

When downloading a package dependency via git, the entire repository and all its history is always downloaded. This is problematic considering git history can't be removed in a backwards-compatible way so there's no way to reduce the size of a large repository.

waitbutY commented 1 month ago

@dtroupe-plaid do you know if Plaid is looking to pick up the work item of publishing an SPM specific repository?

dtroupe-plaid commented 1 month ago

This is something we can do, but it's going to take a little while. In the meantime I recommend importing the XCFramework directly if you're experiencing this issue.

dtroupe-plaid commented 3 weeks ago

Hey everyone, This issues is now resolved by plaid-link-ios-spm. Only the latest version 5.6.0 on LinkKit is supported in this new repo. Please let me know if you have any issues.

Also thank you @waitbutY for providing a solution to this issue 🙏