Skip to content

Commit c5279a6

Browse files
gh-action-runnergh-action-runner
authored andcommitted
Squashed 'apollo-ios/' changes from 5dee1f010..543ed1c70
543ed1c70 Merge 2.0 into main branch (#780) git-subtree-dir: apollo-ios git-subtree-split: 543ed1c706060fd8dfb8c2f83dd24ca927a66b97
1 parent efc993d commit c5279a6

File tree

166 files changed

+6777
-8579
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

166 files changed

+6777
-8579
lines changed

Apollo.podspec

Lines changed: 0 additions & 48 deletions
This file was deleted.

ApolloTestSupport.podspec

Lines changed: 0 additions & 21 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 274 additions & 95 deletions
Large diffs are not rendered by default.

Design/3093-graphql-defer.md

Lines changed: 0 additions & 444 deletions
This file was deleted.

Package.swift

Lines changed: 23 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,14 @@
1-
// swift-tools-version:5.9
2-
//
3-
// The swift-tools-version declares the minimum version of Swift required to build this package.
4-
// Swift 5.9 is available from Xcode 15.0.
5-
1+
// swift-tools-version:6.1
62

73
import PackageDescription
84

95
let package = Package(
106
name: "Apollo",
117
platforms: [
12-
.iOS(.v12),
13-
.macOS(.v10_14),
14-
.tvOS(.v12),
15-
.watchOS(.v5),
8+
.iOS(.v15),
9+
.macOS(.v12),
10+
.tvOS(.v15),
11+
.watchOS(.v8),
1612
.visionOS(.v1),
1713
],
1814
products: [
@@ -24,8 +20,7 @@ let package = Package(
2420
.library(name: "ApolloTestSupport", targets: ["ApolloTestSupport"]),
2521
.plugin(name: "InstallCLI", targets: ["Install CLI"])
2622
],
27-
dependencies: [
28-
],
23+
dependencies: [],
2924
targets: [
3025
.target(
3126
name: "Apollo",
@@ -35,15 +30,19 @@ let package = Package(
3530
resources: [
3631
.copy("Resources/PrivacyInfo.xcprivacy")
3732
],
38-
swiftSettings: [.enableUpcomingFeature("ExistentialAny")]
33+
swiftSettings: [
34+
.swiftLanguageMode(.v6)
35+
]
3936
),
4037
.target(
4138
name: "ApolloAPI",
4239
dependencies: [],
4340
resources: [
4441
.copy("Resources/PrivacyInfo.xcprivacy")
4542
],
46-
swiftSettings: [.enableUpcomingFeature("ExistentialAny")]
43+
swiftSettings: [
44+
.swiftLanguageMode(.v6)
45+
]
4746
),
4847
.target(
4948
name: "ApolloSQLite",
@@ -53,7 +52,9 @@ let package = Package(
5352
resources: [
5453
.copy("Resources/PrivacyInfo.xcprivacy")
5554
],
56-
swiftSettings: [.enableUpcomingFeature("ExistentialAny")]
55+
swiftSettings: [
56+
.swiftLanguageMode(.v6)
57+
]
5758
),
5859
.target(
5960
name: "ApolloWebSocket",
@@ -63,15 +64,19 @@ let package = Package(
6364
resources: [
6465
.copy("Resources/PrivacyInfo.xcprivacy")
6566
],
66-
swiftSettings: [.enableUpcomingFeature("ExistentialAny")]
67+
swiftSettings: [
68+
.swiftLanguageMode(.v6)
69+
]
6770
),
6871
.target(
6972
name: "ApolloTestSupport",
7073
dependencies: [
7174
"Apollo",
7275
"ApolloAPI"
7376
],
74-
swiftSettings: [.enableUpcomingFeature("ExistentialAny")]
77+
swiftSettings: [
78+
.swiftLanguageMode(.v6)
79+
]
7580
),
7681
.plugin(
7782
name: "Install CLI",
@@ -86,5 +91,6 @@ let package = Package(
8691
dependencies: [],
8792
path: "Plugins/InstallCLI"
8893
)
89-
]
94+
],
95+
swiftLanguageModes: [.v6, .v5]
9096
)

Plugins/InstallCLI/InstallCLIPluginCommand.swift

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,12 @@ struct InstallCLIPluginCommand: CommandPlugin {
1414
try dependencies.forEach { dep in
1515
if dep.package.displayName == "Apollo" {
1616
let process = Process()
17-
let path = try context.tool(named: "sh").path
18-
process.executableURL = URL(fileURLWithPath: path.string)
19-
process.arguments = ["\(dep.package.directory)/scripts/download-cli.sh", context.package.directory.string]
17+
let url = try context.tool(named: "sh").url
18+
process.executableURL = URL(fileURLWithPath: url.absoluteString)
19+
process.arguments = [
20+
"\(dep.package.directoryURL)/scripts/download-cli.sh",
21+
context.package.directoryURL.absoluteString
22+
]
2023
try process.run()
2124
process.waitUntilExit()
2225
}
@@ -33,11 +36,11 @@ extension InstallCLIPluginCommand: XcodeCommandPlugin {
3336
/// 👇 This entry point is called when operating on an Xcode project.
3437
func performCommand(context: XcodePluginContext, arguments: [String]) throws {
3538
let process = Process()
36-
let toolPath = try context.tool(named: "sh").path
37-
process.executableURL = URL(fileURLWithPath: toolPath.string)
39+
let toolURL = try context.tool(named: "sh").url
40+
process.executableURL = URL(fileURLWithPath: toolURL.absoluteString)
3841

3942
let downloadScriptPath = try downloadScriptPath(context: context)
40-
process.arguments = [downloadScriptPath, context.xcodeProject.directory.string]
43+
process.arguments = [downloadScriptPath, context.xcodeProject.directoryURL.standardized.relativePath]
4144

4245
try process.run()
4346
process.waitUntilExit()
@@ -50,15 +53,15 @@ extension InstallCLIPluginCommand: XcodeCommandPlugin {
5053
private func downloadScriptPath(context: XcodePluginContext) throws -> String {
5154
let xcodeVersion = try xcodeVersion(context: context)
5255
let relativeScriptPath = "SourcePackages/checkouts/apollo-ios/scripts/download-cli.sh"
53-
let absoluteScriptPath: String
56+
let absoluteScriptPath: URL
5457

5558
if xcodeVersion.lexicographicallyPrecedes("16.3") {
56-
absoluteScriptPath = "\(context.pluginWorkDirectory)/../../../\(relativeScriptPath)"
59+
absoluteScriptPath = context.pluginWorkDirectoryURL.appending(path: "../../../\(relativeScriptPath)")
5760
} else {
58-
absoluteScriptPath = "\(context.pluginWorkDirectory)/../../../../\(relativeScriptPath)"
61+
absoluteScriptPath = context.pluginWorkDirectoryURL.appending(path: "../../../../\(relativeScriptPath)")
5962
}
6063

61-
return absoluteScriptPath
64+
return absoluteScriptPath.standardized.relativePath
6265
}
6366

6467
/// Used to get a string representation of Xcode in the current toolchain.
@@ -67,8 +70,8 @@ extension InstallCLIPluginCommand: XcodeCommandPlugin {
6770
/// - Returns: A string representation of the Xcode version.
6871
private func xcodeVersion(context: XcodePluginContext) throws -> String {
6972
let process = Process()
70-
let toolPath = try context.tool(named: "xcrun").path
71-
process.executableURL = URL(fileURLWithPath: toolPath.string)
73+
let toolURL = try context.tool(named: "xcrun").url
74+
process.executableURL = URL(fileURLWithPath: toolURL.absoluteString)
7275
process.arguments = ["xcodebuild", "-version"]
7376

7477
let outputPipe = Pipe()

README.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,8 @@
2626
</a>
2727
<a href="https://swift.org/package-manager/">
2828
<img src="https://img.shields.io/badge/Swift_Package_Manager-compatible-orange?style=flat-square" alt="Swift Package Manager compatible">
29-
</a>
30-
<a href="https://cocoapods.org/pods/Apollo">
31-
<img src="https://img.shields.io/cocoapods/v/Apollo.svg" alt="CocoaPods compatible">
32-
</a>
29+
</a>
30+
</p>
3331

3432
</div>
3533
</header>

0 commit comments

Comments
 (0)