facebook / facebook-ios-sdk

Used to integrate the Facebook Platform with your iOS & tvOS apps.
https://developers.facebook.com/docs/ios
Other
7.8k stars 3.56k forks source link

Static Framework as a swift package #2378

Open ashender opened 7 months ago

ashender commented 7 months ago

Checklist before submitting a feature request

Goals

I want to install facebook-ios-sdk via SPM as a static framework to take advantage of dead code stripping and faster app launch.

Expected results

my archived iOS app binary that depends on FBSDKCoreKit.framework installed via SPM package at https://github.com/facebook/facebook-ios-sdk has all FBSDKCoreKit.framework/FBSDKCoreKit binary linked in to main app binary during static linking otool -L MyApp output doesn't contain FBSDK* entries

    @rpath/FBSDKShareKit.framework/FBSDKShareKit (compatibility version 1.0.0, current version 1.0.0)
    @rpath/FBAEMKit.framework/FBAEMKit (compatibility version 1.0.0, current version 1.0.0)
    @rpath/FBSDKCoreKit_Basics.framework/FBSDKCoreKit_Basics (compatibility version 1.0.0, current version 1.0.0)
    @rpath/FBSDKCoreKit.framework/FBSDKCoreKit (compatibility version 1.0.0, current version 1.0.0)

Code samples & details

add Facebook SDK via 

.package(url: "https://github.com/facebook/facebook-ios-sdk.git", from: "17.0.0"),

import and use package in the source code