Skip to content

Commit

Permalink
chore: Merge branch 'Update-feature-wifi-only' into Link-back-with-front
Browse files Browse the repository at this point in the history
# Conflicts:
#	kDrive/Resources/de.lproj/Localizable.strings
#	kDrive/Resources/es.lproj/Localizable.strings
#	kDrive/Resources/fr.lproj/Localizable.strings
#	kDrive/Resources/it.lproj/Localizable.strings
#	kDrive/UI/Controller/Menu/ParameterTableViewController.swift
#	kDrive/UI/Controller/Menu/PhotoSyncSettingsViewController.swift
#	kDrive/UI/Controller/Menu/WifiSyncSettingsViewController.swift
#	kDrive/UI/View/Menu/Parameters/ParameterSyncTableViewCell.swift
#	kDriveCore/Utils/DriveUserDefaults+Extension.swift
  • Loading branch information
adrien-coye committed Nov 14, 2024
2 parents d49749b + 6fff1b0 commit f05c24b
Show file tree
Hide file tree
Showing 266 changed files with 1,161 additions and 1,617 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/swiftformat.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: SwiftFormat

on:
pull_request:
branches: [ master ]

jobs:
build:
name: SwiftFormat
runs-on: [ self-hosted, iOS ]

steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- uses: jdx/mise-action@v2
with:
cache: false
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: SwiftFormat
run: swiftformat --lint . --reporter github-actions-log
25 changes: 25 additions & 0 deletions .github/workflows/swiftlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: SwiftLint

on:
pull_request:
branches: [ master ]

jobs:
build:
name: SwiftLint
runs-on: [ self-hosted, iOS ]

steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- uses: jdx/mise-action@v2
with:
cache: false
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: SwiftLint
run: swiftlint --config .swiftlint.yml --config .swiftlint-ci.yml --reporter github-actions-logging .
9 changes: 5 additions & 4 deletions .mise.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[tools]
tuist = '4.12.0'
periphery = '2.21.0'
swiftformat = '0.54.0'
swiftlint = '0.55.0'
tuist = '4.12.1'
periphery = '2.21.1'
swiftformat = '0.54.5'
swiftlint = '0.57.0'

4 changes: 2 additions & 2 deletions .swiftformat
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
--strongOutlets
--acronyms ID,URL,UUID
--allman false
--assetliterals visual-width
Expand Down Expand Up @@ -80,6 +79,7 @@
--wraptypealiases preserve
--xcodeindentation disabled
--yodaswap always
--disable andOperator,opaqueGenericParameters,preferKeyPath,redundantReturn,strongOutlets,trailingCommas,unusedArguments,wrapMultilineStatementBraces
--disable andOperator,opaqueGenericParameters,preferKeyPath,redundantReturn,strongOutlets,trailingCommas,unusedArguments,wrapMultilineStatementBraces,conditionalAssignment
--enable blankLineAfterImports,blankLinesBetweenImports
--exclude DerivedData,Derived,Tuist,Project.swift,Build,.build

3 changes: 3 additions & 0 deletions .swiftlint-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
disabled_rules:
- todo
strict: true
4 changes: 3 additions & 1 deletion .swiftlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ disabled_rules:
- force_cast
- cyclomatic_complexity
- closure_parameter_position
- non_optional_string_data_conversion
- inclusive_language
- for_where
- optional_data_string_conversion
opt_in_rules:
- strong_iboutlet
- closure_end_indentation
Expand Down
4 changes: 3 additions & 1 deletion Project.swift
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,9 @@ let project = Project(name: "kDrive",
.external(name: "MQTTNIO"),
.external(name: "InfomaniakCore"),
.external(name: "InfomaniakCoreDB"),
.external(name: "InfomaniakCoreUI"),
.external(name: "InfomaniakCoreCommonUI"),
.external(name: "InfomaniakCoreSwiftUI"),
.external(name: "InfomaniakCoreUIKit"),
.external(name: "InfomaniakLogin"),
.external(name: "InfomaniakDI"),
.external(name: "InfomaniakConcurrency"),
Expand Down
79 changes: 53 additions & 26 deletions Tuist/Package.resolved
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/Alamofire/Alamofire",
"state" : {
"revision" : "f455c2975872ccd2d9c81594c658af65716e9b9a",
"version" : "5.9.1"
"revision" : "e16d3481f5ed35f0472cb93350085853d754913f",
"version" : "5.10.1"
}
},
{
"identity" : "atlantis",
"kind" : "remoteSourceControl",
"location" : "https://github.com/ProxymanApp/atlantis",
"state" : {
"revision" : "523dd773538e1e20036cb2d28f8b9947448c2d20",
"version" : "1.25.1"
"revision" : "b60fb9920e50f8f8a7e909394b09989c9d55d7ef",
"version" : "1.25.2"
}
},
{
Expand Down Expand Up @@ -86,17 +86,17 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/Infomaniak/ios-core",
"state" : {
"revision" : "6c175294c2ff03c43eb7c9bd32ebd3a8c6448b0d",
"version" : "11.0.0"
"revision" : "82fa2c1f0fc4b6d0f520697bb073a7acddd52833",
"version" : "12.5.0"
}
},
{
"identity" : "ios-core-ui",
"kind" : "remoteSourceControl",
"location" : "https://github.com/Infomaniak/ios-core-ui",
"state" : {
"revision" : "f45301c68bd9421a8f29f676bab658933e8a6807",
"version" : "10.1.0"
"revision" : "e0afbab522df72496b92042ee65c20f8d593a3f7",
"version" : "13.4.0"
}
},
{
Expand All @@ -113,17 +113,17 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/Infomaniak/ios-login",
"state" : {
"revision" : "7214a97f73b9b19858d3b3139a2fe47be86e142e",
"version" : "6.0.2"
"revision" : "b12bf4fbbfe0edf10d2516503e97a9f212d1cd5b",
"version" : "7.0.1"
}
},
{
"identity" : "ios-version-checker",
"kind" : "remoteSourceControl",
"location" : "https://github.com/Infomaniak/ios-version-checker",
"state" : {
"revision" : "c8fd02352bfc6bede63e41bdb21f2472f7bc1612",
"version" : "6.0.0"
"revision" : "5b68ced5b52f9c95b6cb6d671273c608ed38d2fc",
"version" : "7.0.2"
}
},
{
Expand Down Expand Up @@ -212,26 +212,26 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/realm/realm-core.git",
"state" : {
"revision" : "b36f2436c2746c32b1f93dcc06ea8b859671a767",
"version" : "14.12.1"
"revision" : "85eeca41654cc9070ad81a21a4b1d153ad467c33",
"version" : "14.13.1"
}
},
{
"identity" : "realm-swift",
"kind" : "remoteSourceControl",
"location" : "https://github.com/realm/realm-swift",
"state" : {
"revision" : "9b9992d59a5148eb557e6c0445fec05009022c8c",
"version" : "10.53.1"
"revision" : "5553cfd1c789efdb3d6daf7f0cc0733cfe601846",
"version" : "10.54.1"
}
},
{
"identity" : "sentry-cocoa",
"kind" : "remoteSourceControl",
"location" : "https://github.com/getsentry/sentry-cocoa",
"state" : {
"revision" : "5575af93efb776414f243e93d6af9f6258dc539a",
"version" : "8.36.0"
"revision" : "c64d4a85fd8a48a49b89788684826820a68d0863",
"version" : "8.40.0"
}
},
{
Expand Down Expand Up @@ -275,8 +275,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-collections.git",
"state" : {
"revision" : "9bf03ff58ce34478e66aaee630e491823326fd06",
"version" : "1.1.3"
"revision" : "671108c96644956dddcd89dd59c203dcdb36cec7",
"version" : "1.1.4"
}
},
{
Expand All @@ -302,17 +302,17 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-nio.git",
"state" : {
"revision" : "9746cf80e29edfef2a39924a66731249223f42a3",
"version" : "2.72.0"
"revision" : "914081701062b11e3bb9e21accc379822621995e",
"version" : "2.76.1"
}
},
{
"identity" : "swift-nio-transport-services",
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-nio-transport-services.git",
"state" : {
"revision" : "38ac8221dd20674682148d6451367f89c2652980",
"version" : "1.21.0"
"revision" : "bbd5e63cf949b7db0c9edaf7a21e141c52afe214",
"version" : "1.23.0"
}
},
{
Expand All @@ -329,8 +329,17 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-system.git",
"state" : {
"revision" : "d2ba781702a1d8285419c15ee62fd734a9437ff5",
"version" : "1.3.2"
"revision" : "c8a44d836fe7913603e246acab7c528c2e780168",
"version" : "1.4.0"
}
},
{
"identity" : "swiftbackports",
"kind" : "remoteSourceControl",
"location" : "https://github.com/shaps80/SwiftBackports",
"state" : {
"revision" : "ddca6a237c1ba2291d5a3cc47ec8480ce6e9f805",
"version" : "1.0.3"
}
},
{
Expand All @@ -341,6 +350,24 @@
"revision" : "d8c4846dfbbe04aa8196ae5a5a3cdc6cd7f9f6bc",
"version" : "1.0.0"
}
},
{
"identity" : "swiftui-introspect",
"kind" : "remoteSourceControl",
"location" : "https://github.com/siteline/SwiftUI-Introspect",
"state" : {
"revision" : "807f73ce09a9b9723f12385e592b4e0aaebd3336",
"version" : "1.3.0"
}
},
{
"identity" : "swiftuibackports",
"kind" : "remoteSourceControl",
"location" : "https://github.com/shaps80/SwiftUIBackports",
"state" : {
"revision" : "556d42f391b74059a354b81b8c8e19cc7cb576f4",
"version" : "1.15.1"
}
}
],
"version" : 2
Expand Down
8 changes: 4 additions & 4 deletions Tuist/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ let package = Package(
dependencies: [
.package(url: "https://github.com/apple/swift-algorithms", .upToNextMajor(from: "1.2.0")),
.package(url: "https://github.com/Alamofire/Alamofire", .upToNextMajor(from: "5.2.2")),
.package(url: "https://github.com/Infomaniak/ios-core", .upToNextMajor(from: "11.0.0")),
.package(url: "https://github.com/Infomaniak/ios-core-ui", .upToNextMajor(from: "10.0.0")),
.package(url: "https://github.com/Infomaniak/ios-login", .upToNextMajor(from: "6.0.1")),
.package(url: "https://github.com/Infomaniak/ios-core", .upToNextMajor(from: "12.2.0")),
.package(url: "https://github.com/Infomaniak/ios-core-ui", .upToNextMajor(from: "13.1.0")),
.package(url: "https://github.com/Infomaniak/ios-login", .upToNextMajor(from: "7.0.1")),
.package(url: "https://github.com/Infomaniak/ios-dependency-injection", .upToNextMajor(from: "2.0.0")),
.package(url: "https://github.com/Infomaniak/swift-concurrency", .upToNextMajor(from: "0.0.4")),
.package(url: "https://github.com/Infomaniak/ios-version-checker", .upToNextMajor(from: "6.0.0")),
.package(url: "https://github.com/Infomaniak/ios-version-checker", .upToNextMajor(from: "7.0.0")),
.package(url: "https://github.com/Infomaniak/LocalizeKit", .upToNextMajor(from: "1.0.2")),
.package(url: "https://github.com/realm/realm-swift", .upToNextMajor(from: "10.52.0")),
.package(url: "https://github.com/SCENEE/FloatingPanel", .upToNextMajor(from: "2.0.0")),
Expand Down
2 changes: 1 addition & 1 deletion Tuist/ProjectDescriptionHelpers/Constants.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public enum Constants {
public static let baseSettings = SettingsDictionary()
.automaticCodeSigning(devTeam: "864VDCS2QY")
.currentProjectVersion("1")
.marketingVersion("5.0.1")
.marketingVersion("5.0.2")

public static let deploymentTarget = DeploymentTargets.iOS("13.4")
public static let destinations = Set<Destination>([.iPhone, .iPad])
Expand Down
2 changes: 1 addition & 1 deletion kDrive/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import AVFoundation
import BackgroundTasks
import CocoaLumberjackSwift
import InfomaniakCore
import InfomaniakCoreUI
import InfomaniakCoreUIKit
import InfomaniakDI
import InfomaniakLogin
import kDriveCore
Expand Down
17 changes: 9 additions & 8 deletions kDrive/AppRouter.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*/

import InfomaniakCore
import InfomaniakCoreUI
import InfomaniakCoreUIKit
import InfomaniakDI
import kDriveCore
import kDriveResources
Expand All @@ -41,7 +41,7 @@ public struct AppRouter: AppNavigable {
@MainActor private var window: UIWindow? {
let scene = UIApplication.shared.connectedScenes.first { scene in
guard let delegate = scene.delegate,
delegate as? SceneDelegate != nil else {
delegate is SceneDelegate else {
return false
}

Expand Down Expand Up @@ -81,13 +81,13 @@ public struct AppRouter: AppNavigable {
}

switch route {
case .saveFile(let file):
case .saveFiles(let files):
guard let driveFileManager = accountManager.currentDriveFileManager else {
Log.sceneDelegate("NavigationManager: Unable to navigate to .saveFile without a DriveFileManager", level: .error)
return
}

showSaveFileVC(from: viewController, driveFileManager: driveFileManager, file: file)
showSaveFileVC(from: viewController, driveFileManager: driveFileManager, files: files)

case .store(let driveId, let userId):
guard let driveFileManager = accountManager.getDriveFileManager(for: driveId, userId: userId) else {
Expand Down Expand Up @@ -280,11 +280,12 @@ public struct AppRouter: AppNavigable {
private func restorePreviewViewController(driveFileManager: DriveFileManager,
navigationController: UINavigationController,
sceneUserInfo: [AnyHashable: Any]) async {
guard sceneUserInfo[SceneRestorationValues.driveId.rawValue] as? Int != nil,
guard sceneUserInfo[SceneRestorationValues.driveId.rawValue] is Int,
let fileIds = sceneUserInfo[SceneRestorationValues.Carousel.filesIds.rawValue] as? [Int],
let currentIndex = sceneUserInfo[SceneRestorationValues.Carousel.currentIndex.rawValue] as? Int,
let normalFolderHierarchy = sceneUserInfo[SceneRestorationValues.Carousel.normalFolderHierarchy.rawValue] as? Bool,
let presentationOrigin = sceneUserInfo[SceneRestorationValues.Carousel.presentationOrigin.rawValue] as? PresentationOrigin else {
let rawPresentationOrigin = sceneUserInfo[SceneRestorationValues.Carousel.presentationOrigin.rawValue] as? String,
let presentationOrigin = PresentationOrigin(rawValue: rawPresentationOrigin) else {
Log.sceneDelegate("metadata issue for PreviewController :\(sceneUserInfo)", level: .error)
return
}
Expand Down Expand Up @@ -438,8 +439,8 @@ public struct AppRouter: AppNavigable {
navController.pushViewController(photoSyncSettingsViewController, animated: true)
}

public func showSaveFileVC(from viewController: UIViewController, driveFileManager: DriveFileManager, file: ImportedFile) {
let vc = SaveFileViewController.instantiateInNavigationController(driveFileManager: driveFileManager, file: file)
public func showSaveFileVC(from viewController: UIViewController, driveFileManager: DriveFileManager, files: [ImportedFile]) {
let vc = SaveFileViewController.instantiateInNavigationController(driveFileManager: driveFileManager, files: files)
viewController.present(vc, animated: true)
}

Expand Down
6 changes: 6 additions & 0 deletions kDrive/Resources/de.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -2071,6 +2071,12 @@
/* loco:62344c023cb45e6fcb219b43 */
"trashedFileRestoreFileToOriginalPlaceSuccess-plural" = "%d Elemente am ursprünglichen Ort wiederhergestellt";

/* loco:66fe3560501931dbfb04f0c8 */
"unknownArtist" = "Unbekannter Künstler";

/* loco:66fe3634a0cfdc15cf0c1a94 */
"unknownTitle" = "Unbekannter Titel";

/* loco:6049df4d5c2c3a04bc397a7d */
"updateAvailableDescription" = "Mit Blick auf ein optimales kDrive-Benutzererlebnis empfehlen wir Ihnen, Ihre Anwendung zu aktualisieren.";

Expand Down
Loading

0 comments on commit f05c24b

Please sign in to comment.