iZettle / sdk-ios

Add card payments from Zettle to your own app
https://developer.zettle.com/docs/ios-sdk
Other
79 stars 35 forks source link

Integrating the SDK via SPM requires a lengthy download #461

Open ls-bertrand-landry-hetu opened 2 weeks ago

ls-bertrand-landry-hetu commented 2 weeks ago

Expected Behavior

The initial download of the SDK using SPM should be very fast as the framework is relatively small.

Current Behavior

Integrating the SDK causes a download of the entire git history so we have to wait for 1.4 GB of data to be downloaded before it is usable. This is pretty slow unless you are wired in on a fast connection.

The same thing happens when you clear the caches repositories under ~/Library/Caches/org.swift.swiftpm.

Steps to Reproduce

In a new Xcode project integrate https://github.com/iZettle/sdk-ios via SPM.

Context

Please provide any relevant information about your setup. This is important in case the issue is not reproducible except for under certain conditions.

Failure Logs

Couldn't get any logs, but Xcode does show the timing information where the SDK took 707s to download.

image

Size information from the ~/Library/Caches/org.swift.swiftpm folder

bertrand@CAMB-YF9HFL3HT7 sdk-ios-fe8c8475 % pwd
/Users/bertrand/Library/Caches/org.swift.swiftpm/repositories/sdk-ios-fe8c8475 bertrand@CAMB-YF9HFL3HT7 sdk-ios-fe8c8475 % du -hs . 1.4G .

Suggested solution

With other vendors, they've started a separate repository for hosting only the Package.swift which contains links to binaries & hashes of the specific release. With this approach the Package repository remains small as only the package file is included in the history. See https://github.com/intercom/intercom-ios-sp for an example.

MBelogorodtsev-IZ commented 2 weeks ago

Hello @ls-bertrand-landry-hetu, Thank you a lot for bringing it and additional thank you for detailed ticket and suggested solution! We will definitely consider it during future plannings.

Meanwhile, let's keep this thread open and we will notify you once it's been improved.