From 21616ac8f5e45f3184942d1b93cea7d16b43c7b7 Mon Sep 17 00:00:00 2001 From: TizianoCoroneo Date: Wed, 17 Jan 2024 17:31:49 +0100 Subject: [PATCH] completed cleanup script for GraphQL. --- Package.resolved | 4 ++-- Package.swift | 2 +- .../Tutorials/Adding a Deeplink.tutorial | 1 + Sources/Deeplink/SampleDeeplink.swift | 4 ++-- Tests/DeeplinkTests/URLPatternMatcherTests.swift | 7 ++++++- 5 files changed, 12 insertions(+), 6 deletions(-) diff --git a/Package.resolved b/Package.resolved index 01b0e0a..e65252d 100644 --- a/Package.resolved +++ b/Package.resolved @@ -5,8 +5,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/apple/swift-docc-plugin", "state" : { - "revision" : "10bc670db657d11bdd561e07de30a9041311b2b1", - "version" : "1.1.0" + "revision" : "26ac5758409154cc448d7ab82389c520fa8a8247", + "version" : "1.3.0" } }, { diff --git a/Package.swift b/Package.swift index 1e91d73..0300c1c 100644 --- a/Package.swift +++ b/Package.swift @@ -5,7 +5,7 @@ import PackageDescription let package = Package( name: "Deeplink", platforms: [ - .iOS(.v9), + .iOS(.v13), .macOS(.v10_10), ], products: [ diff --git a/Sources/Deeplink/Documentation.docc/Tutorials/Adding a Deeplink.tutorial b/Sources/Deeplink/Documentation.docc/Tutorials/Adding a Deeplink.tutorial index 2a86c07..0ca7cb3 100644 --- a/Sources/Deeplink/Documentation.docc/Tutorials/Adding a Deeplink.tutorial +++ b/Sources/Deeplink/Documentation.docc/Tutorials/Adding a Deeplink.tutorial @@ -64,6 +64,7 @@ Now we need to make a template that describes how to parse the information from a link. This time, we'll use a keypath to our `[String]` property, and pass an additional argument to tell the system what separator should we use to parse the arguments. + As before, the data present in the URL at the location where the keypath is inserted will be assigned to the property indicated by the keypath; each item in its own String object. @Code(name: "Defining Deeplink Data Lists.swift", file: "AddingADeeplinkList 2.swift") diff --git a/Sources/Deeplink/SampleDeeplink.swift b/Sources/Deeplink/SampleDeeplink.swift index 5330cc4..356ae7f 100644 --- a/Sources/Deeplink/SampleDeeplink.swift +++ b/Sources/Deeplink/SampleDeeplink.swift @@ -39,7 +39,7 @@ public struct SampleDeeplink { /// - deeplinkTemplate: The deeplink template that you want to test. It is recommended to pass the exact same template instance that you use in your `DeeplinkCenter` to avoid having to manually keep them in sync. /// - urlToParse: The test URL that you want to use for testing. /// - assigningToInstance: The instance of the object to which assign the values of the parsed parameters. - /// - expectation: A closure where you should declare an expectation to fulfill, using `XCTestCase.expectation(description:)`. + /// - expectation: A closure where you should declare an expectation to fulfill, using ``XCTest/XCTestCase/expectation(description:)``. /// - assertions: A closure that you can use to verify the correctness of the parsed parameters. public init( deeplinkTemplate: Deeplink, @@ -67,7 +67,7 @@ public extension SampleDeeplink where Value == Void { /// - Parameters: /// - deeplinkTemplate: The deeplink template that you want to test. It is recommended to pass the exact same template instance that you use in your `DeeplinkCenter` to avoid having to manually keep them in sync. /// - urlToParse: The test URL that you want to use for testing. - /// - expectation: A closure where you should declare an expectation to fulfill, using `XCTestCase.expectation(description:)`. + /// - expectation: A closure where you should declare an expectation to fulfill, using ``XCTest/XCTestCase/expectation(description:)``. init( deeplinkTemplate: Deeplink, urlToParse: URL, diff --git a/Tests/DeeplinkTests/URLPatternMatcherTests.swift b/Tests/DeeplinkTests/URLPatternMatcherTests.swift index 5cf19aa..78f9ba4 100644 --- a/Tests/DeeplinkTests/URLPatternMatcherTests.swift +++ b/Tests/DeeplinkTests/URLPatternMatcherTests.swift @@ -116,10 +116,15 @@ class URLPathDataTests: XCTestCase { data) } - func testURLPathDataInitializerThrowsForInvalidComponents() { + func testURLPathDataInitializerThrowsForInvalidComponents() throws { + + if #available(iOS 17, *) { + throw XCTSkip() + } /// `a://@@` conforms to RFC 1808 (passing the URL initializer), but not to RFC 3986, necessary for `URLComponents` to work. /// https://stackoverflow.com/questions/55609012/what-kind-of-url-is-not-conforming-to-rfc-3986-but-is-conforming-to-rfc-1808-rf + /// UPDATE: iOS 17's `URL` initializer does not accept this URL anymore. I have no idea what RFC is in effect now. let url: URL = "a://@@" XCTAssertThrowsError(