Skip to content

Integrating the SDK via SPM requires a lengthy download #461

Description

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.

  • Operating Version: macOS 14.5
  • SDK version: 4.0.1

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions