Skip to content

Commit 29f979e

Browse files
committed
Merge branch 'release/2.7.3'
2 parents b807dab + f6c62e2 commit 29f979e

File tree

102 files changed

+1014
-154
lines changed

Some content is hidden

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

102 files changed

+1014
-154
lines changed

.github/workflows/build.yml

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,22 @@ jobs:
1111
runs-on: [self-hosted, macOS, ARM64]
1212
env:
1313
DERIVED_DATA_PATH: 'DerivedData'
14-
DEVICE: 'iPhone 15 Pro'
14+
DEVICE: 'iPhone 17 Pro'
1515
strategy:
1616
matrix:
1717
config: ['freemium', 'premium']
1818
steps:
1919
- uses: actions/checkout@v4
20+
with:
21+
# Disable shallow clone for SonarCloud analysis
22+
# https://docs.sonarsource.com/sonarqube-cloud/advanced-setup/ci-based-analysis/github-actions-for-sonarcloud
23+
fetch-depth: 0
2024
- uses: actions/cache@v4
2125
with:
2226
path: .build
2327
key: ${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }}
2428
restore-keys: |
2529
${{ runner.os }}-spm-
26-
- name: Install SwiftLint
27-
run: brew install swiftlint
2830
- name: Run process.sh script
2931
run: |
3032
./Scripts/process.sh
@@ -33,8 +35,6 @@ jobs:
3335
run: |
3436
cd fastlane
3537
./scripts/create-cloud-access-secrets.sh
36-
- name: Select Xcode 15.3
37-
run: sudo xcode-select -s /Applications/Xcode_15.3.app
3838
- name: Configuration for freemium
3939
if: ${{ matrix.config == 'freemium' }}
4040
run: |
@@ -44,15 +44,17 @@ jobs:
4444
run: |
4545
echo "BUILD_CMD=SWIFT_ACTIVE_COMPILATION_CONDITIONS='\$(inherited) ALWAYS_PREMIUM'" >> $GITHUB_ENV
4646
- name: Build
47-
run: set -o pipefail && env NSUnbufferedIO=YES xcodebuild clean build-for-testing -scheme 'AllTests' -destination "name=$DEVICE" -derivedDataPath $DERIVED_DATA_PATH ${{ env.BUILD_CMD }} | xcpretty
47+
run: set -o pipefail && env NSUnbufferedIO=YES xcodebuild clean build-for-testing -scheme 'AllTests' -destination "name=$DEVICE" -derivedDataPath $DERIVED_DATA_PATH ${{ env.BUILD_CMD }} | xcbeautify
4848
- name: Test
49-
run: set -o pipefail && env NSUnbufferedIO=YES xcodebuild test-without-building -xctestrun $(find . -type f -name "*.xctestrun") -destination "name=$DEVICE" -derivedDataPath $DERIVED_DATA_PATH | xcpretty
50-
- name: Upload code coverage report
49+
run: set -o pipefail && env NSUnbufferedIO=YES xcodebuild test-without-building -xctestrun $(find . -type f -name "*.xctestrun") -destination "name=$DEVICE" -derivedDataPath $DERIVED_DATA_PATH | xcbeautify
50+
- name: Generate coverage report
5151
if: ${{ matrix.config == 'freemium' }}
5252
run: |
53-
gem install slather
54-
slather coverage -x --build-directory $DERIVED_DATA_PATH --ignore "$DERIVED_DATA_PATH/SourcePackages/*" --scheme AllTests Cryptomator.xcodeproj
55-
bash <(curl -Ls https://coverage.codacy.com/get.sh)
53+
xcresult_path=$(find $DERIVED_DATA_PATH/Logs/Test -name "*.xcresult" | head -n 1)
54+
bash Scripts/xccov-to-sonarqube-generic.sh "$xcresult_path" > sonarqube-generic-coverage.xml
55+
- name: SonarCloud Scan
56+
if: ${{ matrix.config == 'freemium' }}
57+
uses: SonarSource/sonarqube-scan-action@v6.0.0
5658
env:
57-
CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }}
59+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
5860
continue-on-error: true

.swiftformat

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
--minversion 0.49.2
1+
--minversion 0.58.3
2+
--exclude DerivedData
23

34
# format options
45

.xcode-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
26.0.1

Cryptomator.xcodeproj/project.pbxproj

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -439,12 +439,16 @@
439439
74F5DC1C26DCD2FB00AFE989 /* StoreObserver.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74F5DC1B26DCD2FB00AFE989 /* StoreObserver.swift */; };
440440
74F5DC1F26DD036D00AFE989 /* StoreManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74F5DC1E26DD036D00AFE989 /* StoreManager.swift */; };
441441
74FC576125ADED030003ED27 /* VaultCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74FC576025ADED030003ED27 /* VaultCell.swift */; };
442+
988E23D6223540118B002237 /* ShareVaultCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 988E23D6223540118B002238 /* ShareVaultCoordinator.swift */; };
442443
B330CB452CB5735300C21E03 /* UnauthorizedErrorViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = B330CB442CB5735000C21E03 /* UnauthorizedErrorViewController.swift */; };
443444
B34C53262D142B1000F30FE9 /* EnterSharePointURLViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = B34C53252D142B0700F30FE9 /* EnterSharePointURLViewController.swift */; };
444445
B34C53282D142B5800F30FE9 /* EnterSharePointURLViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = B34C53272D142B5400F30FE9 /* EnterSharePointURLViewModel.swift */; };
445446
B34C532A2D142BA700F30FE9 /* SharePointAuthenticating.swift in Sources */ = {isa = PBXBuildFile; fileRef = B34C53292D142B9200F30FE9 /* SharePointAuthenticating.swift */; };
447+
B3544E282EC1F564006B7BA9 /* ShareVaultView.swift in Sources */ = {isa = PBXBuildFile; fileRef = B3544E272EC1F564006B7BA9 /* ShareVaultView.swift */; };
446448
B379DBBF2D27F595003B5849 /* SharePointDriveListViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = B379DBBE2D27F58C003B5849 /* SharePointDriveListViewController.swift */; };
447449
B379DBC12D27F5B5003B5849 /* SharePointDriveListViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = B379DBC02D27F5A4003B5849 /* SharePointDriveListViewModel.swift */; };
450+
B3C397FE2EB10FC0001280AC /* ShareVaultViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = B3C397FC2EB10FC0001280AC /* ShareVaultViewController.swift */; };
451+
B3C398002EB110F9001280AC /* ShareVaultViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = B3C397FF2EB110F9001280AC /* ShareVaultViewModel.swift */; };
448452
B3D19A442CB937C700CD18A5 /* FileProviderCoordinatorError.swift in Sources */ = {isa = PBXBuildFile; fileRef = B3D19A432CB937BF00CD18A5 /* FileProviderCoordinatorError.swift */; };
449453
/* End PBXBuildFile section */
450454

@@ -1058,12 +1062,16 @@
10581062
74F5DC1B26DCD2FB00AFE989 /* StoreObserver.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StoreObserver.swift; sourceTree = "<group>"; };
10591063
74F5DC1E26DD036D00AFE989 /* StoreManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StoreManager.swift; sourceTree = "<group>"; };
10601064
74FC576025ADED030003ED27 /* VaultCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VaultCell.swift; sourceTree = "<group>"; };
1065+
988E23D6223540118B002238 /* ShareVaultCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShareVaultCoordinator.swift; sourceTree = "<group>"; };
10611066
B330CB442CB5735000C21E03 /* UnauthorizedErrorViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UnauthorizedErrorViewController.swift; sourceTree = "<group>"; };
10621067
B34C53252D142B0700F30FE9 /* EnterSharePointURLViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EnterSharePointURLViewController.swift; sourceTree = "<group>"; };
10631068
B34C53272D142B5400F30FE9 /* EnterSharePointURLViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EnterSharePointURLViewModel.swift; sourceTree = "<group>"; };
10641069
B34C53292D142B9200F30FE9 /* SharePointAuthenticating.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SharePointAuthenticating.swift; sourceTree = "<group>"; };
1070+
B3544E272EC1F564006B7BA9 /* ShareVaultView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShareVaultView.swift; sourceTree = "<group>"; };
10651071
B379DBBE2D27F58C003B5849 /* SharePointDriveListViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SharePointDriveListViewController.swift; sourceTree = "<group>"; };
10661072
B379DBC02D27F5A4003B5849 /* SharePointDriveListViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SharePointDriveListViewModel.swift; sourceTree = "<group>"; };
1073+
B3C397FC2EB10FC0001280AC /* ShareVaultViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShareVaultViewController.swift; sourceTree = "<group>"; };
1074+
B3C397FF2EB110F9001280AC /* ShareVaultViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShareVaultViewModel.swift; sourceTree = "<group>"; };
10671075
B3D19A432CB937BF00CD18A5 /* FileProviderCoordinatorError.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FileProviderCoordinatorError.swift; sourceTree = "<group>"; };
10681076
/* End PBXFileReference section */
10691077

@@ -1282,6 +1290,7 @@
12821290
4A4B7E3E26B2ABC0009BFDB1 /* VaultDetailViewController.swift */,
12831291
4A4B7E4126B2AD6F009BFDB1 /* VaultDetailViewModel.swift */,
12841292
4AB8539B26BA8A8200555F00 /* VaultPasswordVerifying.swift */,
1293+
B3C397FD2EB10FC0001280AC /* ShareVault */,
12851294
4AF45357271F2A8B00CF1919 /* RenameVault */,
12861295
4A0337C82726FBEC001753B7 /* MoveVault */,
12871296
4A91D8CF272ADC7E003F8BD8 /* ChangePassword */,
@@ -2114,6 +2123,17 @@
21142123
path = Purchase;
21152124
sourceTree = "<group>";
21162125
};
2126+
B3C397FD2EB10FC0001280AC /* ShareVault */ = {
2127+
isa = PBXGroup;
2128+
children = (
2129+
B3544E272EC1F564006B7BA9 /* ShareVaultView.swift */,
2130+
988E23D6223540118B002238 /* ShareVaultCoordinator.swift */,
2131+
B3C397FF2EB110F9001280AC /* ShareVaultViewModel.swift */,
2132+
B3C397FC2EB10FC0001280AC /* ShareVaultViewController.swift */,
2133+
);
2134+
path = ShareVault;
2135+
sourceTree = "<group>";
2136+
};
21172137
/* End PBXGroup section */
21182138

21192139
/* Begin PBXNativeTarget section */
@@ -2783,6 +2803,8 @@
27832803
4A644B57267C958F008CBB9A /* ChildCoordinator.swift in Sources */,
27842804
4A53CC15267CC33100853BB3 /* CreateNewVaultPasswordViewModel.swift in Sources */,
27852805
4AA22C1E261CA94700A17486 /* UsernameFieldCell.swift in Sources */,
2806+
B3C397FE2EB10FC0001280AC /* ShareVaultViewController.swift in Sources */,
2807+
988E23D6223540118B002237 /* ShareVaultCoordinator.swift in Sources */,
27862808
4A136132276770BB0077EB7F /* SnapshotVaultListViewModel.swift in Sources */,
27872809
4AED9A79286B4DF500352951 /* S3Authenticating.swift in Sources */,
27882810
747C35172762A3F500E4CA28 /* AttributedTextHeaderFooterViewModel.swift in Sources */,
@@ -2810,6 +2832,7 @@
28102832
4A644B55267C926A008CBB9A /* FolderCreating.swift in Sources */,
28112833
74A295EF2D80902800C54136 /* SharePointAuthenticator.swift in Sources */,
28122834
4A3D658626847B11000DA764 /* CreateNewLocalVaultViewModel.swift in Sources */,
2835+
B3C398002EB110F9001280AC /* ShareVaultViewModel.swift in Sources */,
28132836
4AE97DAB24572E4900452814 /* AppDelegate.swift in Sources */,
28142837
4AA22C16261CA8D800A17486 /* URLFieldCell.swift in Sources */,
28152838
4A2FD07925B5D98B008565C8 /* CloudCell.swift in Sources */,
@@ -2824,6 +2847,7 @@
28242847
4A4B7E7426B954D2009BFDB1 /* HeaderFooterViewModel.swift in Sources */,
28252848
4A5AC441275A5B3500342AA7 /* PurchaseAlert.swift in Sources */,
28262849
74C2BC5026E8FCC100BCAA03 /* PurchaseViewModel.swift in Sources */,
2850+
B3544E282EC1F564006B7BA9 /* ShareVaultView.swift in Sources */,
28272851
B379DBBF2D27F595003B5849 /* SharePointDriveListViewController.swift in Sources */,
28282852
4A644B53267BAFDA008CBB9A /* CreateNewFolderViewModel.swift in Sources */,
28292853
4AB8539826BA881F00555F00 /* VaultDetailUnlockVaultViewModel.swift in Sources */,
@@ -3376,7 +3400,7 @@
33763400
GCC_WARN_UNUSED_FUNCTION = YES;
33773401
GCC_WARN_UNUSED_VARIABLE = YES;
33783402
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
3379-
MARKETING_VERSION = 2.7.2;
3403+
MARKETING_VERSION = 2.7.3;
33803404
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
33813405
MTL_FAST_MATH = YES;
33823406
ONLY_ACTIVE_ARCH = YES;
@@ -3438,7 +3462,7 @@
34383462
GCC_WARN_UNUSED_FUNCTION = YES;
34393463
GCC_WARN_UNUSED_VARIABLE = YES;
34403464
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
3441-
MARKETING_VERSION = 2.7.2;
3465+
MARKETING_VERSION = 2.7.3;
34423466
MTL_ENABLE_DEBUG_INFO = NO;
34433467
MTL_FAST_MATH = YES;
34443468
OTHER_SWIFT_FLAGS = "-Xfrontend -warn-long-expression-type-checking=200 -Xfrontend -warn-long-function-bodies=200";

Cryptomator/AddVault/LocalVault/LocalFileSystemAuthenticationViewModel.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class LocalFileSystemAuthenticationViewModel: SingleSectionTableViewModel, Local
4040
}
4141
}
4242

43-
public static let iCloudDriveRootDirectory = URL(fileURLWithPath: "\(iCloudDrivePrefix)com~apple~CloudDocs/")
43+
static let iCloudDriveRootDirectory = URL(fileURLWithPath: "\(iCloudDrivePrefix)com~apple~CloudDocs/")
4444
private static let iCloudDrivePrefix = "/private/var/mobile/Library/Mobile Documents/"
4545
let documentPickerButtonText: String
4646
let headerText: String

Cryptomator/AddVault/OpenExistingVault/OpenExistingVaultChooseFolderViewController.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ class OpenExistingVaultChooseFolderViewController: ChooseFolderViewController {
4545

4646
override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
4747
if viewModel.foundMasterkey {
48-
let cell = addVaultButtonViewModel.type.init()
48+
let cell = addVaultButtonViewModel.type.init(style: addVaultButtonViewModel.cellStyle, reuseIdentifier: nil)
4949
cell.configure(with: addVaultButtonViewModel)
5050
return cell
5151
} else {

Cryptomator/Common/Cells/BindableTableViewCellViewModel.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ class TableViewCellViewModel: Hashable {
3939
fatalError("not implemented")
4040
}
4141

42+
var cellStyle: UITableViewCell.CellStyle {
43+
return .default
44+
}
45+
4246
private let identifier = UUID()
4347

4448
static func == (lhs: TableViewCellViewModel, rhs: TableViewCellViewModel) -> Bool {

Cryptomator/Common/Cells/ButtonCellViewModel.swift

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,16 @@
99
import UIKit
1010

1111
class ButtonCellViewModel<T>: BindableTableViewCellViewModel {
12-
override var type: ConfigurableTableViewCell.Type { ButtonTableViewCell.self }
12+
private let preferredCellStyle: UITableViewCell.CellStyle
13+
override var cellStyle: UITableViewCell.CellStyle { preferredCellStyle }
1314
let action: T
14-
init(action: T, title: String, titleTextColor: UIColor? = .cryptomatorPrimary, detailTitle: String? = nil, isEnabled: Bool = true, selectionStyle: UITableViewCell.SelectionStyle = .default, accessoryType: UITableViewCell.AccessoryType = .none) {
15+
init(action: T, title: String, titleTextColor: UIColor? = .cryptomatorPrimary, detailTitle: String? = nil, image: UIImage? = nil, isEnabled: Bool = true, selectionStyle: UITableViewCell.SelectionStyle = .default, accessoryType: UITableViewCell.AccessoryType = .none, cellStyle: UITableViewCell.CellStyle = .value1) {
1516
self.action = action
16-
super.init(title: title, titleTextColor: titleTextColor, detailTitle: detailTitle, isEnabled: isEnabled, selectionStyle: selectionStyle, accessoryType: accessoryType)
17+
self.preferredCellStyle = cellStyle
18+
super.init(title: title, titleTextColor: titleTextColor, detailTitle: detailTitle, image: image, isEnabled: isEnabled, selectionStyle: selectionStyle, accessoryType: accessoryType)
1719
}
1820

19-
static func createDisclosureButton(action: T, title: String, detailTitle: String? = nil, accessoryType: UITableViewCell.AccessoryType = .disclosureIndicator, isEnabled: Bool = true) -> ButtonCellViewModel<T> {
20-
return ButtonCellViewModel(action: action, title: title, titleTextColor: nil, detailTitle: detailTitle, isEnabled: isEnabled, accessoryType: accessoryType)
21-
}
22-
}
23-
24-
class ButtonTableViewCell: TableViewCell {
25-
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
26-
super.init(style: .value1, reuseIdentifier: reuseIdentifier)
21+
static func createDisclosureButton(action: T, title: String, detailTitle: String? = nil, image: UIImage? = nil, accessoryType: UITableViewCell.AccessoryType = .disclosureIndicator, isEnabled: Bool = true, cellStyle: UITableViewCell.CellStyle = .value1) -> ButtonCellViewModel<T> {
22+
return ButtonCellViewModel(action: action, title: title, titleTextColor: nil, detailTitle: detailTitle, image: image, isEnabled: isEnabled, accessoryType: accessoryType, cellStyle: cellStyle)
2723
}
2824
}

Cryptomator/Common/Cells/LoadingButtonCell.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
import UIKit
1010

11-
class LoadingButtonCell: ButtonTableViewCell {
11+
class LoadingButtonCell: TableViewCell {
1212
private lazy var loadingIndicator: UIActivityIndicatorView = {
1313
let loadingIndicator = UIActivityIndicatorView(style: .medium)
1414
loadingIndicator.hidesWhenStopped = true

Cryptomator/Common/Cells/SystemSymbolButtonCell.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
import Foundation
1010
import UIKit
1111

12-
class SystemSymbolButtonCell: ButtonTableViewCell {
12+
class SystemSymbolButtonCell: TableViewCell {
1313
override func configure(with viewModel: TableViewCellViewModel) {
1414
super.configure(with: viewModel)
1515
guard let viewModel = viewModel as? SystemSymbolNameProviding else {

0 commit comments

Comments
 (0)