Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions .github/workflows/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
strategy:
matrix: # https://docs.github.com/en/actions/using-jobs/using-a-matrix-for-your-jobs
platform: [mac, ios]
runs-on: macos-15 # https://github.com/actions/runner-images
runs-on: macos-26 # https://github.com/actions/runner-images
steps:
- uses: actions/checkout@v4 # https://github.com/actions/checkout
with:
Expand Down Expand Up @@ -37,9 +37,10 @@ jobs:
if: ${{ github.event.release.prerelease }}
- run: npm run build:${{ matrix.platform }}-safari-15
if: ${{ ! github.event.release.prerelease }}
- name: Set xcode version
run: sudo xcode-select -s "/Applications/Xcode_26_beta_6.app" # https://github.com/actions/runner-images/blob/main/images/macos/macos-15-arm64-Readme.md#xcode
- run: xcodebuild -downloadPlatform iOS # Temporary fix for Xcode_26_beta
# - name: Set xcode version
# run: sudo xcode-select -s "/Applications/Xcode_26.1.1.app" # https://github.com/actions/runner-images/blob/main/images/macos/macos-26-arm64-Readme.md#xcode
# - run: xcodebuild -downloadPlatform iOS # Temporary fix for Xcode_26_beta
# if: matrix.platform == 'ios'
- name: Run fastlane
id: fastlane
working-directory: ./fastlane
Expand Down
52 changes: 28 additions & 24 deletions fastlane/Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,41 +1,40 @@
GEM
remote: https://rubygems.org/
specs:
CFPropertyList (3.0.7)
base64
nkf
rexml
addressable (2.8.7)
public_suffix (>= 2.0.2, < 7.0)
CFPropertyList (3.0.8)
abbrev (0.1.2)
addressable (2.8.8)
public_suffix (>= 2.0.2, < 8.0)
artifactory (3.0.17)
atomos (0.1.3)
aws-eventstream (1.4.0)
aws-partitions (1.1153.0)
aws-sdk-core (3.232.0)
aws-partitions (1.1188.0)
aws-sdk-core (3.239.2)
aws-eventstream (~> 1, >= 1.3.0)
aws-partitions (~> 1, >= 1.992.0)
aws-sigv4 (~> 1.9)
base64
bigdecimal
jmespath (~> 1, >= 1.6.1)
logger
aws-sdk-kms (1.112.0)
aws-sdk-core (~> 3, >= 3.231.0)
aws-sdk-kms (1.118.0)
aws-sdk-core (~> 3, >= 3.239.1)
aws-sigv4 (~> 1.5)
aws-sdk-s3 (1.198.0)
aws-sdk-core (~> 3, >= 3.231.0)
aws-sdk-s3 (1.205.0)
aws-sdk-core (~> 3, >= 3.234.0)
aws-sdk-kms (~> 1)
aws-sigv4 (~> 1.5)
aws-sigv4 (1.12.1)
aws-eventstream (~> 1, >= 1.0.2)
babosa (1.0.4)
base64 (0.3.0)
bigdecimal (3.2.2)
base64 (0.2.0)
bigdecimal (3.3.1)
claide (1.1.0)
colored (1.2)
colored2 (3.1.2)
commander (4.6.0)
highline (~> 2.0.0)
csv (3.3.5)
declarative (0.0.20)
digest-crc (0.7.0)
rake (>= 12.0.0, < 14.0.0)
Expand All @@ -55,9 +54,9 @@ GEM
faraday-rack (~> 1.0)
faraday-retry (~> 1.0)
ruby2_keywords (>= 0.0.4)
faraday-cookie_jar (0.0.7)
faraday-cookie_jar (0.0.8)
faraday (>= 0.8.0)
http-cookie (~> 1.0.0)
http-cookie (>= 1.0.0)
faraday-em_http (1.0.0)
faraday-em_synchrony (1.0.1)
faraday-excon (1.1.0)
Expand All @@ -72,15 +71,18 @@ GEM
faraday_middleware (1.2.1)
faraday (~> 1.0)
fastimage (2.4.0)
fastlane (2.228.0)
fastlane (2.229.1)
CFPropertyList (>= 2.3, < 4.0.0)
abbrev (~> 0.1.2)
addressable (>= 2.8, < 3.0.0)
artifactory (~> 3.0)
aws-sdk-s3 (~> 1.0)
babosa (>= 1.0.3, < 2.0.0)
base64 (~> 0.2.0)
bundler (>= 1.12.0, < 3.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)
Expand All @@ -100,7 +102,9 @@ GEM
jwt (>= 2.1.0, < 3)
mini_magick (>= 4.9.4, < 5.0.0)
multipart-post (>= 2.0.0, < 3.0.0)
mutex_m (~> 0.3.0)
naturally (~> 2.2)
nkf (~> 0.2.0)
optparse (>= 0.1.1, < 1.0.0)
plist (>= 3.1.0, < 4.0.0)
rubyzip (>= 2.0.0, < 3.0.0)
Expand Down Expand Up @@ -159,7 +163,7 @@ GEM
httpclient (2.9.0)
mutex_m
jmespath (1.6.2)
json (2.13.2)
json (2.16.0)
jwt (2.10.2)
base64
logger (1.7.0)
Expand All @@ -171,17 +175,17 @@ GEM
nanaimo (0.4.0)
naturally (2.3.0)
nkf (0.2.0)
optparse (0.6.0)
optparse (0.8.0)
os (1.1.4)
plist (3.7.2)
public_suffix (6.0.2)
rake (13.3.0)
public_suffix (7.0.0)
rake (13.3.1)
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.2)
rexml (3.4.4)
rouge (3.28.0)
ruby2_keywords (0.0.5)
rubyzip (2.4.1)
Expand Down Expand Up @@ -219,11 +223,11 @@ GEM
xcpretty (~> 0.2, >= 0.0.7)

PLATFORMS
arm64-darwin-23
arm64-darwin-25
ruby

DEPENDENCIES
fastlane

BUNDLED WITH
2.6.9
2.7.2
2 changes: 1 addition & 1 deletion xcode/App-Mac/ViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class ViewController: NSViewController {
guard let state = state else {
self.enabledText.stringValue = "Safari Extension State Unknown"
if let error = error {
logger?.error("\(#function, privacy: .public) - \(error.localizedDescription, privacy: .public)")
logger?.error("\(#function, privacy: .public) - \(error, privacy: .public)")
} else {
logger?.error("\(#function, privacy: .public) - couldn't get safari extension state in containing app")
}
Expand Down
6 changes: 3 additions & 3 deletions xcode/App-Shared/ViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ class ViewController: PlatformViewController, WKNavigationDelegate, WKScriptMess
self.extensionState = state.isEnabled ? .on : .off
} catch {
self.extensionState = .error
logger?.error("\(#function, privacy: .public) - \(error.localizedDescription, privacy: .public)")
logger?.error("\(#function, privacy: .public) - \(error, privacy: .public)")
}
if #available(macOS 13, *) {
useSettingsInsteadOfPreferences = true
Expand Down Expand Up @@ -193,7 +193,7 @@ class ViewController: PlatformViewController, WKNavigationDelegate, WKScriptMess
do {
try await SFSafariApplication.showPreferencesForExtension(withIdentifier: extIdentifier)
} catch {
logger?.error("\(#function, privacy: .public) - \(error.localizedDescription, privacy: .public)")
logger?.error("\(#function, privacy: .public) - \(error, privacy: .public)")
return (nil, error.localizedDescription)
}
break
Expand Down Expand Up @@ -344,7 +344,7 @@ extension ViewController {
} else {
status = .error
if let error = error {
logger?.error("\(#function, privacy: .public) - \(error.localizedDescription, privacy: .public)")
logger?.error("\(#function, privacy: .public) - \(error, privacy: .public)")
} else {
logger?.error("\(#function, privacy: .public) - couldn't get safari extension state in containing app")
}
Expand Down
14 changes: 7 additions & 7 deletions xcode/Ext-Safari/Functions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ func updateManifest(with data: Manifest) -> Bool {
try fileContent.write(to: url, atomically: false, encoding: .utf8)
return true
} catch {
logger?.error("\(#function, privacy: .public) - failed to update manifest: \(error.localizedDescription, privacy: .public)")
logger?.error("\(#function, privacy: .public) - failed to update manifest: \(error, privacy: .public)")
return false
}
}
Expand Down Expand Up @@ -742,7 +742,7 @@ func getRequiredCode(_ filename: String, _ resources: [String], _ fileType: Stri
do {
try FileManager.default.removeItem(at: directory)
} catch {
logger?.error("\(#function, privacy: .public) - failed to remove directory: \(error.localizedDescription, privacy: .public)")
logger?.error("\(#function, privacy: .public) - failed to remove directory: \(error, privacy: .public)")
}
}
return true
Expand Down Expand Up @@ -796,11 +796,11 @@ func getRequiredCode(_ filename: String, _ resources: [String], _ fileType: Stri
try FileManager.default.removeItem(at: abandonFileUrl)
logger?.info("\(#function, privacy: .public) - cleanup abandoned resource: \(unsanitize(abandonFileUrl.lastPathComponent), privacy: .public)")
} catch {
logger?.error("\(#function, privacy: .public) - failed to remove abandoned resource: \(error.localizedDescription, privacy: .public)")
logger?.error("\(#function, privacy: .public) - failed to remove abandoned resource: \(error, privacy: .public)")
}
}
} catch {
logger?.error("\(#function, privacy: .public) - failed to cleanup resources: \(error.localizedDescription, privacy: .public)")
logger?.error("\(#function, privacy: .public) - failed to cleanup resources: \(error, privacy: .public)")
}
return true
}
Expand Down Expand Up @@ -877,7 +877,7 @@ func getRemoteFileContents(_ url: String) -> String? {
}
}
if let error = error {
logger?.error("\(#function, privacy: .public) - task error: \(error.localizedDescription, privacy: .public) (\(url, privacy: .public))")
logger?.error("\(#function, privacy: .public) - task error: \(error, privacy: .public) (\(url, privacy: .public))")
}
semaphore.signal()
}
Expand Down Expand Up @@ -984,7 +984,7 @@ func checkDefaultDirectories() -> Bool {
try FileManager.default.createDirectory(at: url, withIntermediateDirectories: false)
} catch {
// could not create the save location directory, show error
logger?.error("\(#function, privacy: .public) - failed at (1) - \(url, privacy: .public) - \(error.localizedDescription, privacy: .public)")
logger?.error("\(#function, privacy: .public) - failed at (1) - \(url, privacy: .public) - \(error, privacy: .public)")
return false
}
}
Expand Down Expand Up @@ -1763,7 +1763,7 @@ func trashFile(_ item: [String: Any]) -> Bool {
do {
try FileManager.default.trashItem(at: url, resultingItemURL: nil)
} catch {
logger?.error("\(#function, privacy: .public) - \(error.localizedDescription, privacy: .public)")
logger?.error("\(#function, privacy: .public) - \(error, privacy: .public)")
return false
}
}
Expand Down
12 changes: 7 additions & 5 deletions xcode/Shared/Preferences.swift
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ private struct SecurityScopedBookmark {
relativeTo: nil
)
} catch {
logger?.error("\(#function, privacy: .public) - \(error.localizedDescription, privacy: .public)")
logger?.error("\(#function, privacy: .public) - \(error, privacy: .public)")
}
return nil
}
Expand All @@ -74,7 +74,7 @@ private struct SecurityScopedBookmark {
bookmarkDataIsStale: &isStale
)
} catch {
logger?.error("\(#function, privacy: .public) - \(error.localizedDescription, privacy: .public)")
logger?.error("\(#function, privacy: .public) - \(error, privacy: .public)")
}
return nil
}
Expand Down Expand Up @@ -202,7 +202,7 @@ private struct SecurityScopedBookmark {
do {
return try url.bookmarkData(options: .minimalBookmark, includingResourceValuesForKeys: nil, relativeTo: nil)
} catch {
logger?.error("\(#function, privacy: .public) - \(error.localizedDescription, privacy: .public)")
logger?.error("\(#function, privacy: .public) - \(error, privacy: .public)")
}
return nil
}
Expand All @@ -211,7 +211,7 @@ private struct SecurityScopedBookmark {
do {
return try URL(resolvingBookmarkData: data, bookmarkDataIsStale: &isStale)
} catch {
logger?.error("\(#function, privacy: .public) - \(error.localizedDescription, privacy: .public)")
logger?.error("\(#function, privacy: .public) - \(error, privacy: .public)")
}
return nil
}
Expand All @@ -237,7 +237,9 @@ private struct SecurityScopedBookmark {
}
var isStale = false
guard let url = resolvBookmark(data, &isStale) else { // get security-scoped URL
SDefaults?.removeObject(forKey: key) // remove data that cannot be resolved
// Note: temporary mitigation measures for occasional failures on some iOS devices
// SDefaults?.removeObject(forKey: key) // remove data that cannot be resolved
logger?.warning("\(#function, privacy: .public) - faild resolv bookmark, return default")
return defaultValue
}
if isStale, url.startAccessingSecurityScopedResource() { // renew URL bookmark
Expand Down