From 8739113a82d34ad4d9ecb75b085f67042bb8f568 Mon Sep 17 00:00:00 2001 From: OS-pedrogustavobilro Date: Mon, 17 Aug 2026 17:36:31 +0100 Subject: [PATCH 1/4] fix: raw file paths without a scheme couldn't be accessed --- IONFilesystemLib/IONFILEManager.swift | 12 +++++- .../IONFILEFileManagerTests.swift | 39 ++++++++++++++++++- 2 files changed, 48 insertions(+), 3 deletions(-) diff --git a/IONFilesystemLib/IONFILEManager.swift b/IONFilesystemLib/IONFILEManager.swift index fe707de..f58e7cf 100644 --- a/IONFilesystemLib/IONFILEManager.swift +++ b/IONFilesystemLib/IONFILEManager.swift @@ -257,9 +257,19 @@ private extension IONFILEManager { } func resolveRawURL(from path: String) throws -> URL { - guard let rawURL = URL(string: path) else { + guard !path.isEmpty else { throw IONFILEFileManagerError.cantCreateURL(forPath: path) } + + // A scheme-less string (e.g. a bare "/var/.../file.txt" path) parses successfully via + // `URL(string:)` but isn't a file URL, so reads against it fail. Only trust the parsed + // URL when it carries a scheme (e.g. "file://..."); otherwise treat it as a literal path. + let rawURL: URL + if let parsedURL = URL(string: path), parsedURL.scheme != nil { + rawURL = parsedURL + } else { + rawURL = URL(fileURLWithPath: path) + } return fixPathComponentsIfNeeded(rawURL) } diff --git a/IONFilesystemLibTests/IONFILEFileManagerTests.swift b/IONFilesystemLibTests/IONFILEFileManagerTests.swift index 0b069a1..f2637e8 100644 --- a/IONFilesystemLibTests/IONFILEFileManagerTests.swift +++ b/IONFilesystemLibTests/IONFILEFileManagerTests.swift @@ -351,8 +351,9 @@ extension IONFILEFileManagerTests { // Then XCTAssertEqual(filePath + "/", returnedURL.path()) + XCTAssertTrue(returnedURL.isFileURL) } - + func test_getFileURL_doesNotExist_returnsFileSuccessfully() throws { // Given createFileManager(fileExists: false) @@ -363,6 +364,40 @@ extension IONFILEFileManagerTests { // Then XCTAssertEqual(filePath + "/", returnedURL.path()) + XCTAssertTrue(returnedURL.isFileURL) + } + + func test_getFileURL_rawFile_fromBarePath_isResolvedAsFileURL() throws { + // Given + createFileManager(shouldBeDirectory: false) + let filePath = "/test/directory/random_doc.pdf" + + // When + let returnedURL = try sut.getFileURL(atPath: filePath, withSearchPath: .raw) + + // Then + XCTAssertTrue(returnedURL.isFileURL) + XCTAssertEqual(returnedURL.scheme, "file") + XCTAssertEqual(returnedURL.absoluteString, "file://" + filePath) + } + + func test_getFileURL_rawFile_fromBarePath_canActuallyBeRead() throws { + // Given: a bare path (no "file://" scheme), as returned by e.g. the contacts plugin + // when writing a contact photo to the temporary directory on iOS. + createFileManager(shouldBeDirectory: false) + let configurationFileURL = try XCTUnwrap(fetchConfigurationFile()) + let barePath = configurationFileURL.path + + // When + let resolvedURL = try sut.getFileURL(atPath: barePath, withSearchPath: .raw) + let result = try sut.readEntireFile(atURL: resolvedURL, withEncoding: .string(encoding: .utf8)) + + // Then + guard case .string(_, let content) = result else { + XCTFail("Wrong result type") + return + } + XCTAssertEqual(content, Configuration.fileContent) } func test_getFileURL_rawFile_fromInvalidPath_returnsError() { @@ -410,7 +445,7 @@ extension IONFILEFileManagerTests { let returnedURL = try sut.getFileURL(atPath: filePath, withSearchPath: .raw) // Then - XCTAssertEqual(filePath, returnedURL.absoluteString) + XCTAssertEqual("file://" + filePath, returnedURL.absoluteString) } } From c1e0767c4383fce700a5ff2ab197b6d9303a5269 Mon Sep 17 00:00:00 2001 From: Pedro Bilro Date: Mon, 17 Aug 2026 17:49:12 +0100 Subject: [PATCH 2/4] ci: use macos-15 to use Xcode 16 --- .github/workflows/continuous_integration.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/continuous_integration.yml b/.github/workflows/continuous_integration.yml index 3f6ca7a..7538ae5 100644 --- a/.github/workflows/continuous_integration.yml +++ b/.github/workflows/continuous_integration.yml @@ -10,7 +10,7 @@ on: jobs: sonarcloud: name: Unit-Tests - runs-on: macos-latest + runs-on: macos-15 steps: - name: Checkout uses: actions/checkout@v4 From 64d3d7d034e27e2d713b7537c1c7136127562c37 Mon Sep 17 00:00:00 2001 From: Pedro Bilro Date: Tue, 18 Aug 2026 09:01:56 +0100 Subject: [PATCH 3/4] ci: Use macOS 26 and Xcode 26 --- .github/workflows/continuous_integration.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/continuous_integration.yml b/.github/workflows/continuous_integration.yml index 7538ae5..bd9a5c4 100644 --- a/.github/workflows/continuous_integration.yml +++ b/.github/workflows/continuous_integration.yml @@ -10,7 +10,7 @@ on: jobs: sonarcloud: name: Unit-Tests - runs-on: macos-15 + runs-on: macos-26 steps: - name: Checkout uses: actions/checkout@v4 @@ -19,7 +19,7 @@ jobs: run: brew link --overwrite swiftlint || brew install swiftlint - name: Set up XCode - run: sudo xcode-select --switch /Applications/Xcode_16.4.app/Contents/Developer + run: sudo xcode-select --switch /Applications/Xcode_26.6.app/Contents/Developer - name: Bundle Install run: bundle install From 9ea5184872bb652a0cd7d3785162e5afc0cc095b Mon Sep 17 00:00:00 2001 From: OS-pedrogustavobilro Date: Tue, 18 Aug 2026 09:34:41 +0100 Subject: [PATCH 4/4] chore: update Fastlane version --- Gemfile.lock | 250 +++++++++++++++++++++++++++++---------------------- 1 file changed, 143 insertions(+), 107 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index cb1258d..970793a 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,10 +1,8 @@ GEM remote: https://rubygems.org/ specs: - CFPropertyList (3.0.7) - base64 - nkf - rexml + CFPropertyList (3.0.8) + abbrev (0.1.2) activesupport (7.2.2.1) base64 benchmark (>= 0.3) @@ -17,28 +15,31 @@ GEM minitest (>= 5.1) securerandom (>= 0.3) tzinfo (~> 2.0, >= 2.0.5) - addressable (2.8.7) - public_suffix (>= 2.0.2, < 7.0) + addressable (2.9.0) + public_suffix (>= 2.0.2, < 8.0) artifactory (3.0.17) atomos (0.1.3) - aws-eventstream (1.3.0) - aws-partitions (1.1043.0) - aws-sdk-core (3.217.0) + aws-eventstream (1.4.0) + aws-partitions (1.1281.0) + aws-sdk-core (3.254.1) aws-eventstream (~> 1, >= 1.3.0) aws-partitions (~> 1, >= 1.992.0) aws-sigv4 (~> 1.9) + base64 + bigdecimal jmespath (~> 1, >= 1.6.1) - aws-sdk-kms (1.97.0) - aws-sdk-core (~> 3, >= 3.216.0) + logger + aws-sdk-kms (1.130.0) + aws-sdk-core (~> 3, >= 3.254.0) aws-sigv4 (~> 1.5) - aws-sdk-s3 (1.179.0) - aws-sdk-core (~> 3, >= 3.216.0) + aws-sdk-s3 (1.229.0) + aws-sdk-core (~> 3, >= 3.254.1) aws-sdk-kms (~> 1) aws-sigv4 (~> 1.5) - aws-sigv4 (1.11.0) + aws-sigv4 (1.12.1) aws-eventstream (~> 1, >= 1.0.2) babosa (1.0.4) - base64 (0.2.0) + base64 (0.3.0) benchmark (0.4.0) bigdecimal (3.1.9) claide (1.1.0) @@ -49,6 +50,7 @@ GEM highline (~> 2.0.0) concurrent-ruby (1.3.5) connection_pool (2.5.0) + csv (3.3.6) declarative (0.0.20) digest-crc (0.7.0) rake (>= 12.0.0, < 14.0.0) @@ -56,136 +58,150 @@ GEM dotenv (2.8.1) drb (2.2.1) emoji_regex (3.2.3) - excon (0.112.0) - faraday (1.10.4) - faraday-em_http (~> 1.0) - faraday-em_synchrony (~> 1.0) - faraday-excon (~> 1.1) - faraday-httpclient (~> 1.0) - faraday-multipart (~> 1.0) - faraday-net_http (~> 1.0) - faraday-net_http_persistent (~> 1.0) - faraday-patron (~> 1.0) - faraday-rack (~> 1.0) - faraday-retry (~> 1.0) - ruby2_keywords (>= 0.0.4) - faraday-cookie_jar (0.0.7) + erb (6.0.7) + excon (1.7.0) + logger + faraday (2.14.3) + faraday-net_http (>= 2.0, < 3.5) + json + logger + faraday-cookie_jar (0.0.8) faraday (>= 0.8.0) - http-cookie (~> 1.0.0) - faraday-em_http (1.0.0) - faraday-em_synchrony (1.0.0) - faraday-excon (1.1.0) - faraday-httpclient (1.0.1) - faraday-multipart (1.1.0) + http-cookie (>= 1.0.0) + faraday-follow_redirects (0.5.0) + faraday (>= 1, < 3) + faraday-multipart (1.2.0) multipart-post (~> 2.0) - faraday-net_http (1.0.2) - faraday-net_http_persistent (1.2.0) - faraday-patron (1.0.0) - faraday-rack (1.0.0) - faraday-retry (1.0.3) - faraday_middleware (1.2.1) - faraday (~> 1.0) - fastimage (2.4.0) - fastlane (2.226.0) - CFPropertyList (>= 2.3, < 4.0.0) - addressable (>= 2.8, < 3.0.0) + faraday-net_http (3.4.4) + net-http (~> 0.5) + faraday-retry (2.4.0) + faraday (~> 2.0) + fastimage (2.4.1) + fastlane (2.238.0) + CFPropertyList (>= 2.3, < 5.0.0) + abbrev (~> 0.1) + addressable (>= 2.9.0, < 3.0.0) artifactory (~> 3.0) - aws-sdk-s3 (~> 1.0) + aws-sdk-s3 (~> 1.197) babosa (>= 1.0.3, < 2.0.0) - bundler (>= 1.12.0, < 3.0.0) + base64 (~> 0.2) + benchmark (>= 0.1.0) + bundler (>= 2.4.0, < 5.0.0) colored (~> 1.2) commander (~> 4.6) + csv (~> 3.3) dotenv (>= 2.1.1, < 3.0.0) emoji_regex (>= 0.1, < 4.0) - excon (>= 0.71.0, < 1.0.0) - faraday (~> 1.0) - faraday-cookie_jar (~> 0.0.6) - faraday_middleware (~> 1.0) + excon (>= 0.71.0, < 2.0.0) + faraday (~> 2.7) + faraday-cookie_jar (~> 0.0.8) + faraday-follow_redirects (~> 0.3) + faraday-multipart (~> 1.0) + faraday-retry (~> 2.0) fastimage (>= 2.1.0, < 3.0.0) - fastlane-sirp (>= 1.0.0) + fastlane-sirp (>= 1.1.0) gh_inspector (>= 1.1.2, < 2.0.0) google-apis-androidpublisher_v3 (~> 0.3) google-apis-playcustomapp_v1 (~> 0.1) - google-cloud-env (>= 1.6.0, < 2.0.0) + google-cloud-env (>= 1.6.0, < 2.3.0) google-cloud-storage (~> 1.31) highline (~> 2.0) http-cookie (~> 1.0.5) + irb (>= 1.8) json (< 3.0.0) - jwt (>= 2.1.0, < 3) + jwt (>= 2.10.3, < 4) + logger (>= 1.6, < 2.0) mini_magick (>= 4.9.4, < 5.0.0) + multi_json (~> 1.12) multipart-post (>= 2.0.0, < 3.0.0) + mutex_m (~> 0.3) naturally (~> 2.2) + nkf (~> 0.2) optparse (>= 0.1.1, < 1.0.0) + ostruct (>= 0.1.0) plist (>= 3.1.0, < 4.0.0) rubyzip (>= 2.0.0, < 3.0.0) security (= 0.1.5) simctl (~> 1.6.3) terminal-notifier (>= 2.0.0, < 3.0.0) - terminal-table (~> 3) + terminal-table (~> 4) tty-screen (>= 0.6.3, < 1.0.0) tty-spinner (>= 0.8.0, < 1.0.0) word_wrap (~> 1.0.0) xcodeproj (>= 1.13.0, < 2.0.0) - xcpretty (~> 0.4.0) + xcpretty (~> 0.4.1) xcpretty-travis-formatter (>= 0.0.3, < 2.0.0) - fastlane-sirp (1.0.0) - sysrandom (~> 1.0) + fastlane-sirp (1.1.0) gh_inspector (1.1.3) - google-apis-androidpublisher_v3 (0.54.0) - google-apis-core (>= 0.11.0, < 2.a) - google-apis-core (0.11.3) - addressable (~> 2.5, >= 2.5.1) - googleauth (>= 0.16.2, < 2.a) - httpclient (>= 2.8.1, < 3.a) - mini_mime (~> 1.0) + google-apis-androidpublisher_v3 (0.106.0) + google-apis-core (>= 0.15.0, < 2.a) + google-apis-core (1.2.5) + addressable (~> 2.9) + faraday (~> 2.13) + faraday-follow_redirects (~> 0.3) + googleauth (~> 1.14) + mini_mime (~> 1.1) + multi_json (~> 1.11) representable (~> 3.0) - retriable (>= 2.0, < 4.a) - rexml - google-apis-iamcredentials_v1 (0.17.0) - google-apis-core (>= 0.11.0, < 2.a) - google-apis-playcustomapp_v1 (0.13.0) - google-apis-core (>= 0.11.0, < 2.a) - google-apis-storage_v1 (0.31.0) - google-apis-core (>= 0.11.0, < 2.a) - google-cloud-core (1.7.1) + retriable (>= 3.1, < 5.0) + google-apis-iamcredentials_v1 (0.28.0) + google-apis-core (>= 0.15.0, < 2.a) + google-apis-playcustomapp_v1 (0.18.0) + google-apis-core (>= 0.15.0, < 2.a) + google-apis-storage_v1 (0.66.0) + google-apis-core (>= 0.15.0, < 2.a) + google-cloud-core (1.9.0) google-cloud-env (>= 1.0, < 3.a) google-cloud-errors (~> 1.0) - google-cloud-env (1.6.0) - faraday (>= 0.17.3, < 3.0) - google-cloud-errors (1.4.0) - google-cloud-storage (1.47.0) + google-cloud-env (2.2.2) + base64 (~> 0.2) + faraday (>= 1.0, < 3.a) + google-cloud-errors (1.7.0) + google-cloud-storage (1.62.0) addressable (~> 2.8) digest-crc (~> 0.4) - google-apis-iamcredentials_v1 (~> 0.1) - google-apis-storage_v1 (~> 0.31.0) + google-apis-core (>= 0.18, < 2) + google-apis-iamcredentials_v1 (~> 0.18) + google-apis-storage_v1 (>= 0.42) google-cloud-core (~> 1.6) - googleauth (>= 0.16.2, < 2.a) + googleauth (~> 1.9) mini_mime (~> 1.0) - googleauth (1.8.1) - faraday (>= 0.17.3, < 3.a) - jwt (>= 1.4, < 3.0) - multi_json (~> 1.11) + google-logging-utils (0.2.0) + googleauth (1.17.3) + faraday (>= 1.0, < 3.a) + google-cloud-env (~> 2.2) + google-logging-utils (~> 0.1) + jwt (>= 1.4, < 4.0) os (>= 0.9, < 2.0) + pstore (~> 0.1) signet (>= 0.16, < 2.a) highline (2.0.3) http-cookie (1.0.8) domain_name (~> 0.5) - httpclient (2.8.3) i18n (1.14.7) concurrent-ruby (~> 1.0) + io-console (0.9.2) + irb (1.18.0) + pp (>= 0.6.0) + prism (>= 1.3.0) + rdoc (>= 4.0.0) + reline (>= 0.4.2) jmespath (1.6.2) - json (2.9.1) - jwt (2.10.1) + json (2.21.2) + jwt (3.2.0) base64 logger (1.6.5) mini_magick (4.13.2) mini_mime (1.1.5) minitest (5.25.4) - multi_json (1.15.0) + multi_json (1.21.1) multipart-post (2.4.1) + mutex_m (0.3.0) nanaimo (0.4.0) - naturally (2.2.1) - nkf (0.2.0) + naturally (2.3.0) + net-http (0.9.1) + uri (>= 0.11.1) + nkf (0.3.0) nokogiri (1.18.2-aarch64-linux-gnu) racc (~> 1.4) nokogiri (1.18.2-aarch64-linux-musl) @@ -202,28 +218,43 @@ GEM racc (~> 1.4) nokogiri (1.18.2-x86_64-linux-musl) racc (~> 1.4) - optparse (0.6.0) + optparse (0.8.1) os (1.1.4) + ostruct (0.6.3) plist (3.7.2) - public_suffix (6.0.1) + pp (0.6.4) + prettyprint + prettyprint (0.2.0) + prism (1.9.0) + pstore (0.2.1) + public_suffix (7.0.5) racc (1.8.1) - rake (13.2.1) + rake (13.4.2) + rbs (4.1.3) + logger + prism (>= 1.6.0) + tsort + rdoc (8.0.0) + erb + prism (>= 1.6.0) + rbs (>= 4.0.0) + tsort + reline (0.7.0) + io-console (~> 0.5) representable (3.2.0) declarative (< 0.1.0) trailblazer-option (>= 0.1.1, < 0.2.0) uber (< 0.2.0) - retriable (3.1.2) - rexml (3.4.0) + retriable (4.2.0) + rexml (3.4.4) rouge (3.28.0) - ruby2_keywords (0.0.5) rubyzip (2.4.1) securerandom (0.4.1) security (0.1.5) - signet (0.19.0) + signet (0.22.0) addressable (~> 2.8) faraday (>= 0.17.5, < 3.a) - jwt (>= 1.5, < 3.0) - multi_json (~> 1.10) + jwt (>= 1.5, < 4.0) simctl (1.6.10) CFPropertyList naturally @@ -233,11 +264,11 @@ GEM clamp (~> 1.3) nokogiri (>= 1.14.3) xcodeproj (~> 1.27) - sysrandom (1.0.5) terminal-notifier (2.0.0) - terminal-table (3.0.2) - unicode-display_width (>= 1.1.1, < 3) + terminal-table (4.0.0) + unicode-display_width (>= 1.1.1, < 4) trailblazer-option (0.1.2) + tsort (0.2.0) tty-cursor (0.7.1) tty-screen (0.8.2) tty-spinner (0.9.3) @@ -245,16 +276,21 @@ GEM tzinfo (2.0.6) concurrent-ruby (~> 1.0) uber (0.1.0) - unicode-display_width (2.6.0) + unicode-display_width (3.2.0) + unicode-emoji (~> 4.1) + unicode-emoji (4.2.0) + uri (1.1.1) word_wrap (1.0.0) - xcodeproj (1.27.0) + xcodeproj (1.28.1) CFPropertyList (>= 2.3.3, < 4.0) atomos (~> 0.1.3) + base64 claide (>= 1.0.2, < 2.0) colored2 (~> 3.1) nanaimo (~> 0.4.0) + nkf rexml (>= 3.3.6, < 4.0) - xcpretty (0.4.0) + xcpretty (0.4.1) rouge (~> 3.28.0) xcpretty-travis-formatter (1.0.1) xcpretty (~> 0.2, >= 0.0.7)