AppsFlyerFramework icon indicating copy to clipboard operation
AppsFlyerFramework copied to clipboard

AppsFlyer Package via SPM is slow to resolve

Open waitbutY opened this issue 1 year ago • 2 comments

Issue

In our app, we have 40-50 SPM dependencies, and AppsFlyer is in the top 3 slowest packages to resolve.

Potential Solution

This is a known SPM issue, as SPM by default pulls not just the code but all the branches and commit history, etc. https://github.com/swiftlang/swift-package-manager/issues/6062

Some larger repositories have solved this by creating a separate repo that just points to the precompiled XCFramework, resulting in much, much smaller and faster package resolution.

Example, Lottie: https://github.com/airbnb/lottie-spm

Can AppsFlyer SDK be offered in this way for iOS app consumption?

waitbutY avatar Jul 02 '24 15:07 waitbutY

Hi, did you followed this section in the readme?

amit-kremer93 avatar Jul 03 '24 06:07 amit-kremer93

ah @amit-kremer93 I saw that but didn't understand, it looks like -static is equivalent to what im asking for.

However, looks like my Appsflyer Framework is coming as a transitive dependency of segment-apps flyer-ios (https://github.com/AppsFlyerSDK/segment-appsflyer-ios), and that doesn't use the static/dynamic/strict addresses listed in the README, it just pulls in all of AppsFlyer I think (or maybe that is the same as the Dynamic option)

https://github.com/AppsFlyerSDK/segment-appsflyer-ios/blob/master/Package.swift

products: [
        // Products define the executables and libraries a package produces, and make them visible to other packages.
        .library(
            name: "segment-appsflyer-ios",
            targets: ["segment-appsflyer-ios"]),
    ],
    dependencies: [
        // Dependencies declare other packages that this package depends on.
        .package(name: "Segment", url: "https://github.com/segmentio/analytics-ios.git" , from: "4.0.0"),
        .package(name: "AppsFlyerLib" , url: "https://github.com/AppsFlyerSDK/AppsFlyerFramework.git", .exact("6.14.3")),
    ],

waitbutY avatar Jul 03 '24 14:07 waitbutY

This issue is stale because it has been open for 60 days with no activity.

github-actions[bot] avatar Jul 26 '25 10:07 github-actions[bot]

This issue was closed because it has been inactive for 14 days since being marked as stale.

github-actions[bot] avatar Aug 10 '25 10:08 github-actions[bot]