AppsFlyerSDK / AppsFlyerFramework

AppsFlyer Apple SDK
https://support.appsflyer.com/hc/en-us/articles/207032066-AppsFlyer-SDK-Integration-iOS
Other
173 stars 92 forks source link

AppsFlyer Package via SPM is slow to resolve #294

Open waitbutY opened 4 months ago

waitbutY commented 4 months ago

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?

amit-kremer93 commented 4 months ago

Hi, did you followed this section in the readme?

waitbutY commented 4 months ago

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")),
    ],