3 Star 0 Fork 0

Gitee 极速下载/Facebook-SDK-iOS

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
此仓库是为了提升国内下载速度的镜像仓库,每日同步一次。 原始仓库: https://github.com/facebook/facebook-ios-sdk
克隆/下载
Package.swift 7.76 KB
一键复制 编辑 原始数据 按行查看 历史
// swift-tools-version:5.3
// The swift-tools-version declares the minimum version of Swift required to build this package.
/*
* Copyright (c) Meta Platforms, Inc. and affiliates.
* All rights reserved.
*
* This source code is licensed under the license found in the
* LICENSE file in the root directory of this source tree.
*/
import PackageDescription
import Foundation
#if os(Linux)
import Glibc
#else
import Darwin.C
#endif
let package = Package(
name: "Facebook",
platforms: [.iOS(.v12)],
products: [
// The Kernel of the SDK. Must be included as a runtime dependency.
.basics,
// The Facebook AEM Kit
.aem,
/*
The Core SDK library that provides two importable modules:
- FacebookCore which includes the most current interface and
will contain interfaces for new features written in Swift
- FBSDKCoreKit which contains legacy Objective-C interfaces
that will be used to maintain backwards compatibility with
types that have been converted to Swift.
This will not contain interfaces for new features written in Swift.
*/
.core,
// The Facebook Login SDK
.login,
// The Facebook Share SDK
.share,
// The Facebook Gaming Services SDK
.gaming,
],
targets: [
// The kernel of the SDK
.Prefixed.basics,
.basics,
/*
The legacy Objective-C implementation that will be converted to Swift.
This will not contain interfaces for new features written in Swift.
*/
.Prefixed.aem,
// The main AEM module
.aem,
/*
The legacy Objective-C implementation that will be converted to Swift.
This will not contain interfaces for new features written in Swift.
*/
.Prefixed.core,
// The main Core SDK module
.core,
/*
The legacy Objective-C implementation that will be converted to Swift.
This will not contain interfaces for new features written in Swift.
*/
.Prefixed.login,
// The main Login SDK module
.login,
/*
The legacy Objective-C implementation that has been converted to Swift.
This will not contain interfaces for new features written in Swift.
*/
.Prefixed.share,
// The main Share SDK module
.share,
/*
The legacy Objective-C implementation that has been converted to Swift.
This will not contain interfaces for new features written in Swift.
*/
.Prefixed.gamingServices,
// The main Facebook Gaming Services module
.gaming,
],
cxxLanguageStandard: .cxx11
)
extension Product {
static let basics = library(name: .basics, targets: [.basics, .Prefixed.basics])
static let core = library(name: .core, targets: [.core, .Prefixed.core])
static let login = library(name: .login, targets: [.login])
static let share = library(name: .share, targets: [.share, .Prefixed.share])
static let gaming = library(name: .gaming, targets: [.gaming, .Prefixed.gaming])
static let aem = library(name: .aem, targets: [.aem, .Prefixed.aem])
}
extension Target {
static let binarySource = BinarySource()
static func binaryTarget(name: String, remoteChecksum: String) -> Target {
switch binarySource {
case .local:
return .binaryTarget(
name: name,
path: localBinaryPath(for: name)
)
case .remote:
return .binaryTarget(
name: name,
url: remoteBinaryURLString(for: name),
checksum: remoteChecksum
)
}
}
static func localBinaryPath(for targetName: String) -> String {
"build/XCFrameworks/Dynamic/\(targetName).xcframework"
}
static func remoteBinaryURLString(for targetName: String) -> String {
"https://github.com/facebook/facebook-ios-sdk/releases/download/v18.0.0/\(targetName)-Dynamic_XCFramework.zip"
}
static let basics = target(
name: .basics,
dependencies: [.Prefixed.basics],
resources: [
.copy("Resources/PrivacyInfo.xcprivacy"),
]
)
static let aem = target(
name: .aem,
dependencies: [.Prefixed.aem, .Prefixed.basics],
resources: [
.copy("Resources/PrivacyInfo.xcprivacy"),
]
)
static let core = target(
name: .core,
dependencies: [.aem, .Prefixed.basics, .Prefixed.core],
resources: [
.copy("Resources/PrivacyInfo.xcprivacy"),
],
linkerSettings: [
.cPlusPlusLibrary,
.zLibrary,
.accelerateFramework,
]
)
static let login = target(
name: .login,
dependencies: [.core, .Prefixed.login],
resources: [
.copy("Resources/PrivacyInfo.xcprivacy"),
]
)
static let share = target(
name: .share,
dependencies: [.core, .Prefixed.share],
resources: [
.copy("Resources/PrivacyInfo.xcprivacy"),
]
)
static let gaming = target(name: .gaming, dependencies: [.core, .Prefixed.share, .Prefixed.gaming])
enum Prefixed {
static let basics = binaryTarget(
name: .Prefixed.basics,
remoteChecksum: "750f129c7413d51dfdeca1cc983743996fbf28154d80b2434acee7d537d64179"
)
static let aem = binaryTarget(
name: .Prefixed.aem,
remoteChecksum: "b2dda579247ffddad88b09b8a171e6a63c1a6254f97479833987d19392c0ae99"
)
static let core = binaryTarget(
name: .Prefixed.core,
remoteChecksum: "6d78eb5ad74812c8a45921b98824590fb0ad013c0afe7fc42f58fb7a48b17cd4"
)
static let login = binaryTarget(
name: .Prefixed.login,
remoteChecksum: "3c303233edfec91edb29cef0383edb5c9bc9c34acf1a1dd3011d0042f0a88a87"
)
static let share = binaryTarget(
name: .Prefixed.share,
remoteChecksum: "f4bad82bf960caf30f11b173cab49d992c275514aa698cc8851c33683f06e4bb"
)
static let gamingServices = binaryTarget(
name: .Prefixed.gaming,
remoteChecksum: "b17608f729b35516e26fd789285718992fb693e551946f99f97c0dbe2919e7f7"
)
}
}
extension Target.Dependency {
static let aem = byName(name: .aem)
static let core = byName(name: .core)
enum Prefixed {
static let aem = byName(name: .Prefixed.aem)
static let basics = byName(name: .Prefixed.basics)
static let core = byName(name: .Prefixed.core)
static let login = byName(name: .Prefixed.login)
static let share = byName(name: .Prefixed.share)
static let gaming = byName(name: .Prefixed.gaming)
}
}
extension LinkerSetting {
static let cPlusPlusLibrary = linkedLibrary("c++")
static let zLibrary = linkedLibrary("z")
static let accelerateFramework = linkedFramework("Accelerate")
}
enum BinarySource {
case local, remote
init() {
if getenv("USE_LOCAL_FB_BINARIES") != nil {
self = .local
} else {
self = .remote
}
}
}
extension String {
static let aem = "FacebookAEM"
static let basics = "FacebookBasics"
static let core = "FacebookCore"
static let login = "FacebookLogin"
static let share = "FacebookShare"
static let gaming = "FacebookGamingServices"
enum Prefixed {
static let aem = "FBAEMKit"
static let basics = "FBSDKCoreKit_Basics"
static let core = "FBSDKCoreKit"
static let login = "FBSDKLoginKit"
static let share = "FBSDKShareKit"
static let gaming = "FBSDKGamingServicesKit"
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Objective-C
1
https://gitee.com/mirrors/Facebook-SDK-iOS.git
git@gitee.com:mirrors/Facebook-SDK-iOS.git
mirrors
Facebook-SDK-iOS
Facebook-SDK-iOS
main

搜索帮助