From 4c2269ddec50d8bc832fcf3de92f7b38c61c8a56 Mon Sep 17 00:00:00 2001 From: Calvin Cestari Date: Sat, 8 Oct 2022 09:29:43 -0700 Subject: [PATCH 1/2] Removes @inlinable attribute for ABI stability --- Sources/ApolloAPI/CacheKeyInfo.swift | 2 +- Sources/ApolloAPI/CacheReference.swift | 2 +- Sources/ApolloAPI/DataDict.swift | 2 +- Sources/ApolloAPI/Selection+Conditions.swift | 10 +++++----- Sources/ApolloAPI/Selection.swift | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Sources/ApolloAPI/CacheKeyInfo.swift b/Sources/ApolloAPI/CacheKeyInfo.swift index b101a6a91e..f3e28c7e78 100644 --- a/Sources/ApolloAPI/CacheKeyInfo.swift +++ b/Sources/ApolloAPI/CacheKeyInfo.swift @@ -111,7 +111,7 @@ public struct CacheKeyInfo { /// - id: The unique cache key for the response object for the ``CacheKeyInfo``. /// - uniqueKeyGroup: An optional identifier for a group of objects that should be grouped /// together in the `NormalizedCache`. - @inlinable public init(id: String, uniqueKeyGroup: String? = nil) { + public init(id: String, uniqueKeyGroup: String? = nil) { self.id = id self.uniqueKeyGroup = uniqueKeyGroup } diff --git a/Sources/ApolloAPI/CacheReference.swift b/Sources/ApolloAPI/CacheReference.swift index 44158c991a..abad8c8513 100644 --- a/Sources/ApolloAPI/CacheReference.swift +++ b/Sources/ApolloAPI/CacheReference.swift @@ -61,7 +61,7 @@ public struct CacheReference: Hashable { /// /// - Parameters: /// - key: The unique identifier for the referenced object. - @inlinable public init(_ key: String) { + public init(_ key: String) { self.key = key } diff --git a/Sources/ApolloAPI/DataDict.swift b/Sources/ApolloAPI/DataDict.swift index 3aab013b42..ae020f0cc2 100644 --- a/Sources/ApolloAPI/DataDict.swift +++ b/Sources/ApolloAPI/DataDict.swift @@ -4,7 +4,7 @@ public struct DataDict: Hashable { public var _data: JSONObject public let _variables: GraphQLOperation.Variables? - @inlinable public init( + public init( _ data: JSONObject, variables: GraphQLOperation.Variables? ) { diff --git a/Sources/ApolloAPI/Selection+Conditions.swift b/Sources/ApolloAPI/Selection+Conditions.swift index 20c523873a..a298fdde41 100644 --- a/Sources/ApolloAPI/Selection+Conditions.swift +++ b/Sources/ApolloAPI/Selection+Conditions.swift @@ -9,15 +9,15 @@ public extension Selection { struct Conditions: Hashable { public let value: [[Condition]] - @inlinable public init(_ value: [[Condition]]) { + public init(_ value: [[Condition]]) { self.value = value } - @inlinable public init(_ conditions: [Condition]...) { + public init(_ conditions: [Condition]...) { self.value = Array(conditions) } - @inlinable public init(_ condition: Condition) { + public init(_ condition: Condition) { self.value = [[condition]] } @@ -36,7 +36,7 @@ public extension Selection { public let variableName: String public let inverted: Bool - @inlinable public init( + public init( variableName: String, inverted: Bool ) { @@ -44,7 +44,7 @@ public extension Selection { self.inverted = inverted; } - @inlinable public init(stringLiteral value: StringLiteralType) { + public init(stringLiteral value: StringLiteralType) { self.variableName = value self.inverted = false } diff --git a/Sources/ApolloAPI/Selection.swift b/Sources/ApolloAPI/Selection.swift index 8dded8e4b4..a7e4dc26d8 100644 --- a/Sources/ApolloAPI/Selection.swift +++ b/Sources/ApolloAPI/Selection.swift @@ -20,7 +20,7 @@ public enum Selection { return alias ?? name } - @inlinable public init( + public init( _ name: String, alias: String? = nil, type: OutputType, From e277dafcc84c13c7a352b134e49be95290ebb3a8 Mon Sep 17 00:00:00 2001 From: Calvin Cestari Date: Wed, 26 Oct 2022 16:03:36 -0700 Subject: [PATCH 2/2] Add CI step to build xcframework --- .circleci/config.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 6da2269a56..a8879cc87f 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -146,6 +146,21 @@ jobs: - run: command: swift build + XCFramework_Build: + macos: + xcode: << pipeline.parameters.xcode_version >> + steps: + - common_test_setup + - run: + name: Build XCArchive (iOS Simulator) + command: xcodebuild archive -configuration Release -project "Apollo.xcodeproj" -scheme "Apollo" -destination 'generic/platform=iOS Simulator' -archivePath "./build/iphonesimulator.xcarchive" SKIP_INSTALL=NO BUILD_LIBRARY_FOR_DISTRIBUTION=YES + - run: + name: Build XCArchive (iOS) + command: xcodebuild archive -configuration Release -project "Apollo.xcodeproj" -scheme "Apollo" -destination 'generic/platform=iOS' -archivePath "./build/iphoneos.xcarchive" SKIP_INSTALL=NO BUILD_LIBRARY_FOR_DISTRIBUTION=YES + - run: + name: Build XCFramework + command: xcodebuild -create-xcframework -output ./build/Apollo.xcframework -framework ./build/iphonesimulator.xcarchive/Products/@rpath/Apollo.framework -framework ./build/iphoneos.xcarchive/Products/@rpath/Apollo.framework + IntegrationTests_macOS_current: macos: xcode: << pipeline.parameters.xcode_version >> @@ -242,6 +257,8 @@ workflows: jobs: - Swift_Build: name: Build as Swift package + - XCFramework_Build: + name: Build XCFramework - IntegrationTests_macOS_current: name: Apollo Integration Tests - macOS << pipeline.parameters.macos_version >> - macOS_current: