From 784059e45a804c1ee2367449a8e30dfe0b167f9c Mon Sep 17 00:00:00 2001 From: Joe Susnick Date: Thu, 28 Oct 2021 20:17:32 -0700 Subject: [PATCH] Adding ability to test SPM integration Summary: https://fb.workplace.com/groups/iOSDevQA/permalink/7020550424660179/ Has more information about the reasons for the specific decisions in here. High level, the Swift Package file will use the environment variable `USE_LOCAL_FB_BINARIES` if it is available on command line builds. If it is set, the build will use local references to binary targets. The CI test will builds the frameworks then archives a project that uses those artifacts via SPM. Reviewed By: jawwad Differential Revision: D31829704 fbshipit-source-id: 69f907fe2787e0bbd8c8895b1dce6a66ec570f8c --- Package.swift | 181 ++++++-- .../project.pbxproj | 407 ++++++++++++++++++ .../AppDelegate.swift | 33 ++ .../AccentColor.colorset/Contents.json | 11 + .../AppIcon.appiconset/Contents.json | 98 +++++ .../Assets.xcassets/Contents.json | 6 + .../Base.lproj/LaunchScreen.storyboard | 25 ++ .../Base.lproj/Main.storyboard | 24 ++ .../XCFrameworkSPMIntegration/Info.plist | 66 +++ .../SceneDelegate.swift | 63 +++ .../ViewController.swift | 30 ++ 11 files changed, 908 insertions(+), 36 deletions(-) create mode 100644 testing/XCFrameworkSPMIntegration/XCFrameworkSPMIntegration.xcodeproj/project.pbxproj create mode 100644 testing/XCFrameworkSPMIntegration/XCFrameworkSPMIntegration/AppDelegate.swift create mode 100644 testing/XCFrameworkSPMIntegration/XCFrameworkSPMIntegration/Assets.xcassets/AccentColor.colorset/Contents.json create mode 100644 testing/XCFrameworkSPMIntegration/XCFrameworkSPMIntegration/Assets.xcassets/AppIcon.appiconset/Contents.json create mode 100644 testing/XCFrameworkSPMIntegration/XCFrameworkSPMIntegration/Assets.xcassets/Contents.json create mode 100644 testing/XCFrameworkSPMIntegration/XCFrameworkSPMIntegration/Base.lproj/LaunchScreen.storyboard create mode 100644 testing/XCFrameworkSPMIntegration/XCFrameworkSPMIntegration/Base.lproj/Main.storyboard create mode 100644 testing/XCFrameworkSPMIntegration/XCFrameworkSPMIntegration/Info.plist create mode 100644 testing/XCFrameworkSPMIntegration/XCFrameworkSPMIntegration/SceneDelegate.swift create mode 100644 testing/XCFrameworkSPMIntegration/XCFrameworkSPMIntegration/ViewController.swift diff --git a/Package.swift b/Package.swift index 59c9be06b..ec37d00a1 100644 --- a/Package.swift +++ b/Package.swift @@ -12,6 +12,143 @@ */ import PackageDescription +import Foundation + +#if os(Linux) +import Glibc +#else +import Darwin.C +#endif + +enum BinarySource { + case local, remote + + static var current: Self { + if getenv("USE_LOCAL_FB_BINARIES") != nil { + return .local + } else { + return .remote + } + } +} + +struct BinaryTargets { + let source: BinarySource + + var aem: Target { + switch source { + case .local: + return .binaryTarget( + name: "FBAEMKit", + path: "build/XCFrameworks/Static/FBAEMKit.xcframework" + ) + case .remote: + return .binaryTarget( + name: "FBAEMKit", + url: "https://github.com/facebook/facebook-ios-sdk/releases/download/v12.0.2/FBAEMKit-Static_XCFramework.zip", + checksum: "9d973f21d19f2bebc4930740f9f037d887dac99b2e8ffb75a3293ddcd7132043" + ) + } + } + + var basics: Target { + switch source { + case .local: + return .binaryTarget( + name: "FBSDKCoreKit_Basics", + path: "build/XCFrameworks/Static/FBSDKCoreKit_Basics.xcframework" + ) + case .remote: + return .binaryTarget( + name: "FBSDKCoreKit_Basics", + url: "https://github.com/facebook/facebook-ios-sdk/releases/download/v12.0.2/FBSDKCoreKit_Basics-Static_XCFramework.zip", + checksum: "5b4a5eef74b849b18415275fe50d285e61a20afdf83cb40ab70ea3ac3a451ebf" + ) + } + } + + var core: Target { + switch source { + case .local: + return .binaryTarget( + name: "FBSDKCoreKit", + path: "build/XCFrameworks/Static/FBSDKCoreKit.xcframework" + ) + case .remote: + return .binaryTarget( + name: "FBSDKCoreKit", + url: "https://github.com/facebook/facebook-ios-sdk/releases/download/v12.0.2/FBSDKCoreKit-Static_XCFramework.zip", + checksum: "fa00f5376ad989d75559da001aa94c1e4bc5115c4ac882d31a66600aad76e772" + ) + } + } + + var login: Target { + switch source { + case .local: + return .binaryTarget( + name: "FBSDKLoginKit", + path: "build/XCFrameworks/Static/FBSDKLoginKit.xcframework" + ) + case .remote: + return .binaryTarget( + name: "FBSDKLoginKit", + url: "https://github.com/facebook/facebook-ios-sdk/releases/download/v12.0.2/FBSDKLoginKit-Static_XCFramework.zip", + checksum: "27de971ebf8bac22066a27f44a442e6c082968cd3892658d95d7bc3bf50e3b74" + ) + } + } + + var share: Target { + switch source { + case .local: + return .binaryTarget( + name: "FBSDKShareKit", + path: "build/XCFrameworks/Static/FBSDKShareKit.xcframework" + ) + case .remote: + return .binaryTarget( + name: "FBSDKShareKit", + url: "https://github.com/facebook/facebook-ios-sdk/releases/download/v12.0.2/FBSDKShareKit-Static_XCFramework.zip", + checksum: "9971023970ca2a2653e30cf88c0775b3f62c7f417debdf2d6c7cd370342fa638" + ) + } + } + + var gamingServices: Target { + switch source { + case .local: + return .binaryTarget( + name: "FacebookGamingServices", + path: "build/XCFrameworks/Static/FacebookGamingServices.xcframework" + ) + case .remote: + return .binaryTarget( + name: "FacebookGamingServices", + url: "https://github.com/facebook/facebook-ios-sdk/releases/download/v12.0.2/FacebookGamingServices-Static_XCFramework.zip", + checksum: "55587186f8e3e66ad90c872811c9905ac77723f31e3323775456ba7d7288defd" + ) + } + } + + var fbsdkGamingServices: Target { + switch source { + case .local: + return .binaryTarget( + name: "FBSDKGamingServicesKit", + path: "build/XCFrameworks/Static/FBSDKGamingServicesKit.xcframework" + ) + case .remote: + return .binaryTarget( + name: "FBSDKGamingServicesKit", + url: "https://github.com/facebook/facebook-ios-sdk/releases/download/v12.0.2/FBSDKGamingServicesKit-Static_XCFramework.zip", + checksum: "9078d869c616e201a65c015ac271882829ac499609bde59e35c971159eeccb93" + ) + } + } +} + +let targets = BinaryTargets(source: .current) let package = Package( name: "Facebook", @@ -68,21 +205,13 @@ let package = Package( ], targets: [ // The kernel of the SDK - .binaryTarget( - name: "FBSDKCoreKit_Basics", - url: "https://github.com/facebook/facebook-ios-sdk/releases/download/v12.0.2/FBSDKCoreKit_Basics-Static_XCFramework.zip", - checksum: "5b4a5eef74b849b18415275fe50d285e61a20afdf83cb40ab70ea3ac3a451ebf" - ), + targets.basics, /* The legacy Objective-C implementation that will be converted to Swift. This will not contain interfaces for new features written in Swift. */ - .binaryTarget( - name: "FBAEMKit", - url: "https://github.com/facebook/facebook-ios-sdk/releases/download/v12.0.2/FBAEMKit-Static_XCFramework.zip", - checksum: "9d973f21d19f2bebc4930740f9f037d887dac99b2e8ffb75a3293ddcd7132043" - ), + targets.aem, // The main AEM module .target( @@ -94,16 +223,12 @@ let package = Package( The legacy Objective-C implementation that will be converted to Swift. This will not contain interfaces for new features written in Swift. */ - .binaryTarget( - name: "FBSDKCoreKit", - url: "https://github.com/facebook/facebook-ios-sdk/releases/download/v12.0.2/FBSDKCoreKit-Static_XCFramework.zip", - checksum: "fa00f5376ad989d75559da001aa94c1e4bc5115c4ac882d31a66600aad76e772" - ), + targets.core, // The main Core SDK module .target( name: "FacebookCore", - dependencies: ["FBAEMKit", "FBSDKCoreKit_Basics", "FBSDKCoreKit"], + dependencies: ["FacebookAEM", "FBSDKCoreKit_Basics", "FBSDKCoreKit"], linkerSettings: [ .linkedLibrary("c++"), .linkedLibrary("z"), @@ -115,11 +240,7 @@ let package = Package( The legacy Objective-C implementation that will be converted to Swift. This will not contain interfaces for new features written in Swift. */ - .binaryTarget( - name: "FBSDKLoginKit", - url: "https://github.com/facebook/facebook-ios-sdk/releases/download/v12.0.2/FBSDKLoginKit-Static_XCFramework.zip", - checksum: "27de971ebf8bac22066a27f44a442e6c082968cd3892658d95d7bc3bf50e3b74" - ), + targets.login, // The main Login SDK module .target( @@ -131,11 +252,7 @@ let package = Package( The legacy Objective-C implementation that will be converted to Swift. This will not contain interfaces for new features written in Swift. */ - .binaryTarget( - name: "FBSDKShareKit", - url: "https://github.com/facebook/facebook-ios-sdk/releases/download/v12.0.2/FBSDKShareKit-Static_XCFramework.zip", - checksum: "9971023970ca2a2653e30cf88c0775b3f62c7f417debdf2d6c7cd370342fa638" - ), + targets.share, // The main Share SDK module .target( @@ -144,20 +261,12 @@ let package = Package( ), // The main Facebook Gaming Services module - .binaryTarget( - name: "FacebookGamingServices", - url: "https://github.com/facebook/facebook-ios-sdk/releases/download/v12.0.2/FacebookGamingServices-Static_XCFramework.zip", - checksum: "55587186f8e3e66ad90c872811c9905ac77723f31e3323775456ba7d7288defd" - ), + targets.gamingServices, /* Wrappers for backwards compatibility ObjC interfaces. */ - .binaryTarget( - name: "FBSDKGamingServicesKit", - url: "https://github.com/facebook/facebook-ios-sdk/releases/download/v12.0.2/FBSDKGamingServicesKit-Static_XCFramework.zip", - checksum: "9078d869c616e201a65c015ac271882829ac499609bde59e35c971159eeccb93" - ), + targets.fbsdkGamingServices, ], cxxLanguageStandard: CXXLanguageStandard.cxx11 ) diff --git a/testing/XCFrameworkSPMIntegration/XCFrameworkSPMIntegration.xcodeproj/project.pbxproj b/testing/XCFrameworkSPMIntegration/XCFrameworkSPMIntegration.xcodeproj/project.pbxproj new file mode 100644 index 000000000..09d5b96c8 --- /dev/null +++ b/testing/XCFrameworkSPMIntegration/XCFrameworkSPMIntegration.xcodeproj/project.pbxproj @@ -0,0 +1,407 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 52; + objects = { + +/* Begin PBXBuildFile section */ + F4E8E3B32721B91600046A49 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = F4E8E3B22721B91600046A49 /* AppDelegate.swift */; }; + F4E8E3B52721B91600046A49 /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = F4E8E3B42721B91600046A49 /* SceneDelegate.swift */; }; + F4E8E3B72721B91600046A49 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F4E8E3B62721B91600046A49 /* ViewController.swift */; }; + F4E8E3BA2721B91600046A49 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = F4E8E3B82721B91600046A49 /* Main.storyboard */; }; + F4E8E3BC2721B91700046A49 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = F4E8E3BB2721B91700046A49 /* Assets.xcassets */; }; + F4E8E3BF2721B91700046A49 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = F4E8E3BD2721B91700046A49 /* LaunchScreen.storyboard */; }; + F4E8E3C92721B94300046A49 /* FacebookAEM in Frameworks */ = {isa = PBXBuildFile; productRef = F4E8E3C82721B94300046A49 /* FacebookAEM */; }; + F4E8E3CB2721B94300046A49 /* FacebookBasics in Frameworks */ = {isa = PBXBuildFile; productRef = F4E8E3CA2721B94300046A49 /* FacebookBasics */; }; + F4E8E3CD2721B94300046A49 /* FacebookCore in Frameworks */ = {isa = PBXBuildFile; productRef = F4E8E3CC2721B94300046A49 /* FacebookCore */; }; + F4E8E3CF2721B94300046A49 /* FacebookGamingServices in Frameworks */ = {isa = PBXBuildFile; productRef = F4E8E3CE2721B94300046A49 /* FacebookGamingServices */; }; + F4E8E3D12721B94300046A49 /* FacebookLogin in Frameworks */ = {isa = PBXBuildFile; productRef = F4E8E3D02721B94300046A49 /* FacebookLogin */; }; + F4E8E3D32721B94300046A49 /* FacebookShare in Frameworks */ = {isa = PBXBuildFile; productRef = F4E8E3D22721B94300046A49 /* FacebookShare */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + F4E8E3AF2721B91600046A49 /* XCFrameworkSPMIntegration.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = XCFrameworkSPMIntegration.app; sourceTree = BUILT_PRODUCTS_DIR; }; + F4E8E3B22721B91600046A49 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + F4E8E3B42721B91600046A49 /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = ""; }; + F4E8E3B62721B91600046A49 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; + F4E8E3B92721B91600046A49 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + F4E8E3BB2721B91700046A49 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + F4E8E3BE2721B91700046A49 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + F4E8E3C02721B91700046A49 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + F4E8E3C62721B92000046A49 /* ios-sdk */ = {isa = PBXFileReference; lastKnownFileType = folder; name = "ios-sdk"; path = ../..; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + F4E8E3AC2721B91600046A49 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + F4E8E3D12721B94300046A49 /* FacebookLogin in Frameworks */, + F4E8E3C92721B94300046A49 /* FacebookAEM in Frameworks */, + F4E8E3D32721B94300046A49 /* FacebookShare in Frameworks */, + F4E8E3CD2721B94300046A49 /* FacebookCore in Frameworks */, + F4E8E3CB2721B94300046A49 /* FacebookBasics in Frameworks */, + F4E8E3CF2721B94300046A49 /* FacebookGamingServices in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + F4E8E3A62721B91600046A49 = { + isa = PBXGroup; + children = ( + F4E8E3C62721B92000046A49 /* ios-sdk */, + F4E8E3B12721B91600046A49 /* XCFrameworkSPMIntegration */, + F4E8E3B02721B91600046A49 /* Products */, + F4E8E3C72721B94300046A49 /* Frameworks */, + ); + sourceTree = ""; + }; + F4E8E3B02721B91600046A49 /* Products */ = { + isa = PBXGroup; + children = ( + F4E8E3AF2721B91600046A49 /* XCFrameworkSPMIntegration.app */, + ); + name = Products; + sourceTree = ""; + }; + F4E8E3B12721B91600046A49 /* XCFrameworkSPMIntegration */ = { + isa = PBXGroup; + children = ( + F4E8E3B22721B91600046A49 /* AppDelegate.swift */, + F4E8E3B42721B91600046A49 /* SceneDelegate.swift */, + F4E8E3B62721B91600046A49 /* ViewController.swift */, + F4E8E3B82721B91600046A49 /* Main.storyboard */, + F4E8E3BB2721B91700046A49 /* Assets.xcassets */, + F4E8E3BD2721B91700046A49 /* LaunchScreen.storyboard */, + F4E8E3C02721B91700046A49 /* Info.plist */, + ); + path = XCFrameworkSPMIntegration; + sourceTree = ""; + }; + F4E8E3C72721B94300046A49 /* Frameworks */ = { + isa = PBXGroup; + children = ( + ); + name = Frameworks; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + F4E8E3AE2721B91600046A49 /* XCFrameworkSPMIntegration */ = { + isa = PBXNativeTarget; + buildConfigurationList = F4E8E3C32721B91700046A49 /* Build configuration list for PBXNativeTarget "XCFrameworkSPMIntegration" */; + buildPhases = ( + F4E8E3AB2721B91600046A49 /* Sources */, + F4E8E3AC2721B91600046A49 /* Frameworks */, + F4E8E3AD2721B91600046A49 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = XCFrameworkSPMIntegration; + packageProductDependencies = ( + F4E8E3C82721B94300046A49 /* FacebookAEM */, + F4E8E3CA2721B94300046A49 /* FacebookBasics */, + F4E8E3CC2721B94300046A49 /* FacebookCore */, + F4E8E3CE2721B94300046A49 /* FacebookGamingServices */, + F4E8E3D02721B94300046A49 /* FacebookLogin */, + F4E8E3D22721B94300046A49 /* FacebookShare */, + ); + productName = XCFrameworkSPMIntegration; + productReference = F4E8E3AF2721B91600046A49 /* XCFrameworkSPMIntegration.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + F4E8E3A72721B91600046A49 /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 1250; + LastUpgradeCheck = 1250; + TargetAttributes = { + F4E8E3AE2721B91600046A49 = { + CreatedOnToolsVersion = 12.5; + }; + }; + }; + buildConfigurationList = F4E8E3AA2721B91600046A49 /* Build configuration list for PBXProject "XCFrameworkSPMIntegration" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = F4E8E3A62721B91600046A49; + productRefGroup = F4E8E3B02721B91600046A49 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + F4E8E3AE2721B91600046A49 /* XCFrameworkSPMIntegration */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + F4E8E3AD2721B91600046A49 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + F4E8E3BF2721B91700046A49 /* LaunchScreen.storyboard in Resources */, + F4E8E3BC2721B91700046A49 /* Assets.xcassets in Resources */, + F4E8E3BA2721B91600046A49 /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + F4E8E3AB2721B91600046A49 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + F4E8E3B72721B91600046A49 /* ViewController.swift in Sources */, + F4E8E3B32721B91600046A49 /* AppDelegate.swift in Sources */, + F4E8E3B52721B91600046A49 /* SceneDelegate.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXVariantGroup section */ + F4E8E3B82721B91600046A49 /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + F4E8E3B92721B91600046A49 /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + F4E8E3BD2721B91700046A49 /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + F4E8E3BE2721B91700046A49 /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + F4E8E3C12721B91700046A49 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 14.5; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + }; + name = Debug; + }; + F4E8E3C22721B91700046A49 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 14.5; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + F4E8E3C42721B91700046A49 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_IDENTITY = "iPhone Developer"; + CODE_SIGN_STYLE = Manual; + DEVELOPMENT_TEAM = V9WTTPBFK9; + INFOPLIST_FILE = XCFrameworkSPMIntegration/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.facebook.XCFrameworkSPMIntegration.localDevelopment; + PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE_SPECIFIER = "XCFrameworkSPMIntegration Local Development"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + F4E8E3C52721B91700046A49 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_IDENTITY = "iPhone Developer"; + CODE_SIGN_STYLE = Manual; + DEVELOPMENT_TEAM = V9WTTPBFK9; + INFOPLIST_FILE = XCFrameworkSPMIntegration/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.facebook.XCFrameworkSPMIntegration.localDevelopment; + PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE_SPECIFIER = "XCFrameworkSPMIntegration Local Development"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + F4E8E3AA2721B91600046A49 /* Build configuration list for PBXProject "XCFrameworkSPMIntegration" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + F4E8E3C12721B91700046A49 /* Debug */, + F4E8E3C22721B91700046A49 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + F4E8E3C32721B91700046A49 /* Build configuration list for PBXNativeTarget "XCFrameworkSPMIntegration" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + F4E8E3C42721B91700046A49 /* Debug */, + F4E8E3C52721B91700046A49 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + +/* Begin XCSwiftPackageProductDependency section */ + F4E8E3C82721B94300046A49 /* FacebookAEM */ = { + isa = XCSwiftPackageProductDependency; + productName = FacebookAEM; + }; + F4E8E3CA2721B94300046A49 /* FacebookBasics */ = { + isa = XCSwiftPackageProductDependency; + productName = FacebookBasics; + }; + F4E8E3CC2721B94300046A49 /* FacebookCore */ = { + isa = XCSwiftPackageProductDependency; + productName = FacebookCore; + }; + F4E8E3CE2721B94300046A49 /* FacebookGamingServices */ = { + isa = XCSwiftPackageProductDependency; + productName = FacebookGamingServices; + }; + F4E8E3D02721B94300046A49 /* FacebookLogin */ = { + isa = XCSwiftPackageProductDependency; + productName = FacebookLogin; + }; + F4E8E3D22721B94300046A49 /* FacebookShare */ = { + isa = XCSwiftPackageProductDependency; + productName = FacebookShare; + }; +/* End XCSwiftPackageProductDependency section */ + }; + rootObject = F4E8E3A72721B91600046A49 /* Project object */; +} diff --git a/testing/XCFrameworkSPMIntegration/XCFrameworkSPMIntegration/AppDelegate.swift b/testing/XCFrameworkSPMIntegration/XCFrameworkSPMIntegration/AppDelegate.swift new file mode 100644 index 000000000..a812d163c --- /dev/null +++ b/testing/XCFrameworkSPMIntegration/XCFrameworkSPMIntegration/AppDelegate.swift @@ -0,0 +1,33 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +import UIKit +import FacebookCore + +@main +class AppDelegate: UIResponder, UIApplicationDelegate { + + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { + + ApplicationDelegate.shared.application( + application, + didFinishLaunchingWithOptions: launchOptions + ) + return true + } +} diff --git a/testing/XCFrameworkSPMIntegration/XCFrameworkSPMIntegration/Assets.xcassets/AccentColor.colorset/Contents.json b/testing/XCFrameworkSPMIntegration/XCFrameworkSPMIntegration/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 000000000..eb8789700 --- /dev/null +++ b/testing/XCFrameworkSPMIntegration/XCFrameworkSPMIntegration/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/testing/XCFrameworkSPMIntegration/XCFrameworkSPMIntegration/Assets.xcassets/AppIcon.appiconset/Contents.json b/testing/XCFrameworkSPMIntegration/XCFrameworkSPMIntegration/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 000000000..9221b9bb1 --- /dev/null +++ b/testing/XCFrameworkSPMIntegration/XCFrameworkSPMIntegration/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,98 @@ +{ + "images" : [ + { + "idiom" : "iphone", + "scale" : "2x", + "size" : "20x20" + }, + { + "idiom" : "iphone", + "scale" : "3x", + "size" : "20x20" + }, + { + "idiom" : "iphone", + "scale" : "2x", + "size" : "29x29" + }, + { + "idiom" : "iphone", + "scale" : "3x", + "size" : "29x29" + }, + { + "idiom" : "iphone", + "scale" : "2x", + "size" : "40x40" + }, + { + "idiom" : "iphone", + "scale" : "3x", + "size" : "40x40" + }, + { + "idiom" : "iphone", + "scale" : "2x", + "size" : "60x60" + }, + { + "idiom" : "iphone", + "scale" : "3x", + "size" : "60x60" + }, + { + "idiom" : "ipad", + "scale" : "1x", + "size" : "20x20" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "20x20" + }, + { + "idiom" : "ipad", + "scale" : "1x", + "size" : "29x29" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "29x29" + }, + { + "idiom" : "ipad", + "scale" : "1x", + "size" : "40x40" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "40x40" + }, + { + "idiom" : "ipad", + "scale" : "1x", + "size" : "76x76" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "76x76" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "83.5x83.5" + }, + { + "idiom" : "ios-marketing", + "scale" : "1x", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/testing/XCFrameworkSPMIntegration/XCFrameworkSPMIntegration/Assets.xcassets/Contents.json b/testing/XCFrameworkSPMIntegration/XCFrameworkSPMIntegration/Assets.xcassets/Contents.json new file mode 100644 index 000000000..73c00596a --- /dev/null +++ b/testing/XCFrameworkSPMIntegration/XCFrameworkSPMIntegration/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/testing/XCFrameworkSPMIntegration/XCFrameworkSPMIntegration/Base.lproj/LaunchScreen.storyboard b/testing/XCFrameworkSPMIntegration/XCFrameworkSPMIntegration/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 000000000..865e9329f --- /dev/null +++ b/testing/XCFrameworkSPMIntegration/XCFrameworkSPMIntegration/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/testing/XCFrameworkSPMIntegration/XCFrameworkSPMIntegration/Base.lproj/Main.storyboard b/testing/XCFrameworkSPMIntegration/XCFrameworkSPMIntegration/Base.lproj/Main.storyboard new file mode 100644 index 000000000..25a763858 --- /dev/null +++ b/testing/XCFrameworkSPMIntegration/XCFrameworkSPMIntegration/Base.lproj/Main.storyboard @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/testing/XCFrameworkSPMIntegration/XCFrameworkSPMIntegration/Info.plist b/testing/XCFrameworkSPMIntegration/XCFrameworkSPMIntegration/Info.plist new file mode 100644 index 000000000..5b531f7b2 --- /dev/null +++ b/testing/XCFrameworkSPMIntegration/XCFrameworkSPMIntegration/Info.plist @@ -0,0 +1,66 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + $(PRODUCT_BUNDLE_PACKAGE_TYPE) + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + LSRequiresIPhoneOS + + UIApplicationSceneManifest + + UIApplicationSupportsMultipleScenes + + UISceneConfigurations + + UIWindowSceneSessionRoleApplication + + + UISceneConfigurationName + Default Configuration + UISceneDelegateClassName + $(PRODUCT_MODULE_NAME).SceneDelegate + UISceneStoryboardFile + Main + + + + + UIApplicationSupportsIndirectInputEvents + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + + diff --git a/testing/XCFrameworkSPMIntegration/XCFrameworkSPMIntegration/SceneDelegate.swift b/testing/XCFrameworkSPMIntegration/XCFrameworkSPMIntegration/SceneDelegate.swift new file mode 100644 index 000000000..56ffca5c3 --- /dev/null +++ b/testing/XCFrameworkSPMIntegration/XCFrameworkSPMIntegration/SceneDelegate.swift @@ -0,0 +1,63 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +import UIKit + +class SceneDelegate: UIResponder, UIWindowSceneDelegate { + + var window: UIWindow? + + + func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) { + // Use this method to optionally configure and attach the UIWindow `window` to the provided UIWindowScene `scene`. + // If using a storyboard, the `window` property will automatically be initialized and attached to the scene. + // This delegate does not imply the connecting scene or session are new (see `application:configurationForConnectingSceneSession` instead). + guard let _ = (scene as? UIWindowScene) else { return } + } + + func sceneDidDisconnect(_ scene: UIScene) { + // Called as the scene is being released by the system. + // This occurs shortly after the scene enters the background, or when its session is discarded. + // Release any resources associated with this scene that can be re-created the next time the scene connects. + // The scene may re-connect later, as its session was not necessarily discarded (see `application:didDiscardSceneSessions` instead). + } + + func sceneDidBecomeActive(_ scene: UIScene) { + // Called when the scene has moved from an inactive state to an active state. + // Use this method to restart any tasks that were paused (or not yet started) when the scene was inactive. + } + + func sceneWillResignActive(_ scene: UIScene) { + // Called when the scene will move from an active state to an inactive state. + // This may occur due to temporary interruptions (ex. an incoming phone call). + } + + func sceneWillEnterForeground(_ scene: UIScene) { + // Called as the scene transitions from the background to the foreground. + // Use this method to undo the changes made on entering the background. + } + + func sceneDidEnterBackground(_ scene: UIScene) { + // Called as the scene transitions from the foreground to the background. + // Use this method to save data, release shared resources, and store enough scene-specific state information + // to restore the scene back to its current state. + } + + +} + diff --git a/testing/XCFrameworkSPMIntegration/XCFrameworkSPMIntegration/ViewController.swift b/testing/XCFrameworkSPMIntegration/XCFrameworkSPMIntegration/ViewController.swift new file mode 100644 index 000000000..efd135da3 --- /dev/null +++ b/testing/XCFrameworkSPMIntegration/XCFrameworkSPMIntegration/ViewController.swift @@ -0,0 +1,30 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +import UIKit + +class ViewController: UIViewController { + + override func viewDidLoad() { + super.viewDidLoad() + // Do any additional setup after loading the view. + } + + +} +