Skip to content

Commit 4175683

Browse files
authored
#2525 Use macos-xcode15 image on semaphore (#2527)
* #2525 Update semaphore image to macos-xcode15 * wip * wip * wip * wip * wip * update appium:platformVersion to 17.4 * wip * wip * wip * wip * wip * wip * wip * wip
1 parent 9837f80 commit 4175683

File tree

27 files changed

+1226
-984
lines changed

27 files changed

+1226
-984
lines changed

.semaphore/semaphore.yml

+2-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: FlowCrypt iOS App
33
agent:
44
machine:
55
type: a1-standard-4
6-
os_image: macos-xcode14
6+
os_image: macos-xcode15
77
execution_time_limit:
88
minutes: 120
99
auto_cancel:
@@ -53,7 +53,6 @@ blocks:
5353
prologue:
5454
commands:
5555
- checkout && cd ~/git/flowcrypt-ios/
56-
- sem-version node 18
5756
- ( cache restore common-npm && npm install && cache store common-npm node_modules )
5857
- ( cd Core && cache restore core-npm && npm install && cache store core-npm node_modules )
5958
- ( cd appium && cache restore appium-npm && npm install && cache store appium-npm node_modules )
@@ -78,7 +77,7 @@ blocks:
7877
commands:
7978
- checkout && cd ~/git/flowcrypt-ios/
8079
- mv ~/appium-env ~/git/flowcrypt-ios/appium/.env
81-
- sem-version node 20 && cache restore appium-npm && cd ./appium && npm i && cd .. && cache store appium-npm appium/node_modules
80+
- cache restore appium-npm && cd ./appium && npm i && cd .. && cache store appium-npm appium/node_modules
8281
- cd appium
8382
- cache restore FlowCrypt-$SEMAPHORE_GIT_SHA.app
8483
epilogue:

.swift-version

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
5.8
1+
5.9

Core/package-lock.json

+115-112
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

FlowCrypt.xcodeproj/project.pbxproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -3937,7 +3937,7 @@
39373937
repositoryURL = "https://github.com/relatedcode/ProgressHUD.git";
39383938
requirement = {
39393939
kind = upToNextMajorVersion;
3940-
minimumVersion = 13.8.6;
3940+
minimumVersion = 14.1.1;
39413941
};
39423942
};
39433943
/* End XCRemoteSwiftPackageReference section */

FlowCrypt.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved

+16-15
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
{
2+
"originHash" : "930974f9ce515f09fa3552320baa442235c0c0ec32152803c76222b16efa82a4",
23
"pins" : [
34
{
45
"identity" : "appauth-ios",
56
"kind" : "remoteSourceControl",
67
"location" : "https://github.com/openid/AppAuth-iOS.git",
78
"state" : {
8-
"revision" : "71cde449f13d453227e687458144bde372d30fc7",
9-
"version" : "1.6.2"
9+
"revision" : "7e2c09cbeb3bb799f26c268dbedb26325ea722a9",
10+
"version" : "1.7.3"
1011
}
1112
},
1213
{
@@ -50,8 +51,8 @@
5051
"kind" : "remoteSourceControl",
5152
"location" : "https://github.com/google/gtm-session-fetcher.git",
5253
"state" : {
53-
"revision" : "76135c9f4e1ac85459d5fec61b6f76ac47ab3a4c",
54-
"version" : "3.3.1"
54+
"revision" : "9534039303015a84837090d20fa21cae6e5eadb6",
55+
"version" : "3.3.2"
5556
}
5657
},
5758
{
@@ -86,26 +87,26 @@
8687
"kind" : "remoteSourceControl",
8788
"location" : "https://github.com/relatedcode/ProgressHUD.git",
8889
"state" : {
89-
"revision" : "46792db49f80454879a939f9b2be31bb61c37b0c",
90-
"version" : "13.8.6"
90+
"revision" : "fd18c75d5f650a949e1da5fc725a1c1b523bbf8e",
91+
"version" : "14.1.1"
9192
}
9293
},
9394
{
9495
"identity" : "realm-cocoa",
9596
"kind" : "remoteSourceControl",
9697
"location" : "https://github.com/realm/realm-cocoa",
9798
"state" : {
98-
"revision" : "55466ae0fb29c5f21866792f05c1fc0c590d7c29",
99-
"version" : "10.47.0"
99+
"revision" : "e0c2fbb442979fbf1e4be80e01d142f310a9c762",
100+
"version" : "10.49.1"
100101
}
101102
},
102103
{
103104
"identity" : "realm-core",
104105
"kind" : "remoteSourceControl",
105106
"location" : "https://github.com/realm/realm-core.git",
106107
"state" : {
107-
"revision" : "a5e87a39cffdcc591f3203c11cfca68100d0b9a6",
108-
"version" : "13.26.0"
108+
"revision" : "374dd672af357732dccc135fecc905406fec3223",
109+
"version" : "14.4.1"
109110
}
110111
},
111112
{
@@ -149,8 +150,8 @@
149150
"kind" : "remoteSourceControl",
150151
"location" : "https://github.com/scinfu/SwiftSoup.git",
151152
"state" : {
152-
"revision" : "1d39e56d364cba79ce43b341f9661b534cccb18d",
153-
"version" : "2.7.1"
153+
"revision" : "028487d4a8a291b2fe1b4392b5425b6172056148",
154+
"version" : "2.7.2"
154155
}
155156
},
156157
{
@@ -194,10 +195,10 @@
194195
"kind" : "remoteSourceControl",
195196
"location" : "https://github.com/jpsim/Yams.git",
196197
"state" : {
197-
"revision" : "0d9ee7ea8c4ebd4a489ad7a73d5c6cad55d6fed3",
198-
"version" : "5.0.6"
198+
"revision" : "8a835d918245ca22f36663dd3862138805d7f707",
199+
"version" : "5.1.0"
199200
}
200201
}
201202
],
202-
"version" : 2
203+
"version" : 3
203204
}

FlowCrypt/Controllers/Compose/Extensions/ComposeViewController+State.swift

+3-4
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,10 @@ extension ComposeViewController {
2828

2929
let deletedSectionsCount = previousSectionsCount - sectionsList.count
3030

31-
let sectionsToReload: [Section]
32-
if let type = selectedRecipientType {
33-
sectionsToReload = sectionsList.filter { $0 != .recipients(type) }
31+
let sectionsToReload: [Section] = if let type = selectedRecipientType {
32+
sectionsList.filter { $0 != .recipients(type) }
3433
} else {
35-
sectionsToReload = sectionsList
34+
sectionsList
3635
}
3736

3837
node.performBatchUpdates {

FlowCrypt/Controllers/Settings/Backup/Backups Option Scene/BackupOptionsViewDecorator.swift

+4-6
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,10 @@ struct BackupOptionsViewDecorator: BackupOptionsViewDecoratorType {
4646
isSelected: Bool
4747
) -> CheckBoxTextNode.Input {
4848

49-
let title: String
50-
51-
switch part {
52-
case .email: title = "backup_option_screen_email"
53-
case .download: title = "backup_option_screen_download"
54-
default: title = ""
49+
let title = switch part {
50+
case .email: "backup_option_screen_email"
51+
case .download: "backup_option_screen_download"
52+
default: ""
5553
}
5654

5755
return CheckBoxTextNode.Input.common(

FlowCrypt/Controllers/Settings/Contacts/Contacts List/ContactKeyDetailDecorator.swift

+18-20
Original file line numberDiff line numberDiff line change
@@ -21,48 +21,46 @@ struct ContactKeyDetailDecorator {
2121
}
2222

2323
private func attributedTitle(for contactKeyPart: ContactKeyDetailViewController.Part) -> NSAttributedString {
24-
let title: String
25-
switch contactKeyPart {
24+
let title = switch contactKeyPart {
2625
case .armored:
27-
title = "contact_key_pub"
26+
"contact_key_pub"
2827
case .signature:
29-
title = "contact_key_signature"
28+
"contact_key_signature"
3029
case .created:
31-
title = "contact_key_created"
30+
"contact_key_created"
3231
case .checked:
33-
title = "contact_key_fetched"
32+
"contact_key_fetched"
3433
case .expire:
35-
title = "contact_key_expires"
34+
"contact_key_expires"
3635
case .longids:
37-
title = "contact_key_longids"
36+
"contact_key_longids"
3837
case .fingerprints:
39-
title = "contact_key_fingerprints"
38+
"contact_key_fingerprints"
4039
case .algo:
41-
title = "contact_key_algo"
40+
"contact_key_algo"
4241
}
4342

4443
return title.localized.attributed(.bold(16))
4544
}
4645

4746
private func content(for pubKey: PubKey, part: ContactKeyDetailViewController.Part) -> NSAttributedString {
48-
let result: String
49-
switch part {
47+
let result: String = switch part {
5048
case .armored:
51-
result = pubKey.armored
49+
pubKey.armored
5250
case .signature:
53-
result = string(from: pubKey.lastSig)
51+
string(from: pubKey.lastSig)
5452
case .created:
55-
result = string(from: pubKey.created)
53+
string(from: pubKey.created)
5654
case .checked:
57-
result = string(from: pubKey.lastChecked)
55+
string(from: pubKey.lastChecked)
5856
case .expire:
59-
result = string(from: pubKey.expiresOn)
57+
string(from: pubKey.expiresOn)
6058
case .longids:
61-
result = pubKey.longids.joined(separator: ", ")
59+
pubKey.longids.joined(separator: ", ")
6260
case .fingerprints:
63-
result = pubKey.fingerprints.joined(separator: ", ")
61+
pubKey.fingerprints.joined(separator: ", ")
6462
case .algo:
65-
result = pubKey.algo?.algorithm ?? "-"
63+
pubKey.algo?.algorithm ?? "-"
6664
}
6765
return result.attributed(.regular(14))
6866
}

FlowCrypt/Controllers/Settings/KeySettings/Key Details/KeyDetailViewDecorator.swift

+7-8
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,13 @@ struct KeyDetailViewDecorator {
2424
let titleInsets = UIEdgeInsets.deviceSpecificTextInsets(top: 16, bottom: 16)
2525

2626
func attributedTitle(for keyDetailPart: KeyDetailViewController.Part) -> NSAttributedString {
27-
let title: String
28-
switch keyDetailPart {
29-
case .description: title = "key_settings_subtitle".localized
30-
case .publicInfo: title = "key_settings_detail_show_public".localized
31-
case .copy: title = "key_settings_detail_copy".localized
32-
case .keyDetails: title = "key_settings_detail_show_details".localized
33-
case .save: title = "key_settings_detail_save".localized
34-
case .privateInfo: title = "key_settings_detail_show_private_title".localized
27+
let title = switch keyDetailPart {
28+
case .description: "key_settings_subtitle".localized
29+
case .publicInfo: "key_settings_detail_show_public".localized
30+
case .copy: "key_settings_detail_copy".localized
31+
case .keyDetails: "key_settings_detail_show_details".localized
32+
case .save: "key_settings_detail_save".localized
33+
case .privateInfo: "key_settings_detail_show_private_title".localized
3534
}
3635

3736
if keyDetailPart.isDescription {

FlowCrypt/Controllers/Setup/SetupViewDecorator.swift

+18-24
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,11 @@ struct SetupViewDecorator {
3333
}
3434

3535
func title(for titleType: TitleType) -> NSAttributedString {
36-
let text: String
37-
38-
switch titleType {
36+
let text = switch titleType {
3937
case .setup, .createKey, .choosePassPhrase:
40-
text = "setup_title"
38+
"setup_title"
4139
case .enterPassPhrase, .importKey:
42-
text = "import_key_description"
40+
"import_key_description"
4341
}
4442

4543
return text
@@ -70,19 +68,17 @@ struct SetupViewDecorator {
7068
}
7169

7270
func subtitle(for subtitleType: SubtitleType) -> NSAttributedString {
73-
let subtitle: String
74-
75-
switch subtitleType {
71+
let subtitle = switch subtitleType {
7672
case let .fetchedKeys(count):
77-
subtitle = "Found %@ key backup(s)".localizePluralsWithArguments(count)
73+
"Found %@ key backup(s)".localizePluralsWithArguments(count)
7874
case let .fetchedEKMKeys(count):
79-
subtitle = "Fetched %@ key(s) on EKM".localizePluralsWithArguments(count)
75+
"Fetched %@ key(s) on EKM".localizePluralsWithArguments(count)
8076
case .common:
81-
subtitle = "setup_description".localized
77+
"setup_description".localized
8278
case .choosingPassPhrase:
83-
subtitle = "create_pass_phrase_tips".localized
79+
"create_pass_phrase_tips".localized
8480
case .noBackups:
85-
subtitle = "setup_no_backups".localized // todo - edit
81+
"setup_no_backups".localized // todo - edit
8682
}
8783

8884
return subtitle
@@ -102,25 +98,23 @@ struct SetupViewDecorator {
10298
}
10399

104100
func buttonTitle(for action: ButtonAction) -> NSAttributedString {
105-
let buttonTitle: String
106-
107-
switch action {
101+
let buttonTitle = switch action {
108102
case .createKey:
109-
buttonTitle = "setup_initial_create_key"
103+
"setup_initial_create_key"
110104
case .importKey:
111-
buttonTitle = "setup_initial_import_key"
105+
"setup_initial_import_key"
112106
case .loadAccount:
113-
buttonTitle = "setup_load"
107+
"setup_load"
114108
case .setPassPhrase:
115-
buttonTitle = "create_pass_phrase_set_title"
109+
"create_pass_phrase_set_title"
116110
case .pasteBoard:
117-
buttonTitle = "import_key_paste"
111+
"import_key_paste"
118112
case .passPhraseContinue:
119-
buttonTitle = "import_key_continue"
113+
"import_key_continue"
120114
case .passPhraseChooseAnother:
121-
buttonTitle = "import_key_choose"
115+
"import_key_choose"
122116
case .fileImport:
123-
buttonTitle = "import_key_file"
117+
"import_key_file"
124118
}
125119

126120
return buttonTitle

FlowCrypt/Controllers/SetupImap/SetupImapViewController.swift

+6-7
Original file line numberDiff line numberDiff line change
@@ -102,13 +102,12 @@ extension SetupImapViewController {
102102
}
103103

104104
var indexPath: IndexPath {
105-
let row: Int
106-
switch self {
107-
case let .account(part): row = part.rawValue
108-
case let .imap(part): row = part.rawValue
109-
case let .smtp(part): row = part.rawValue
110-
case let .other(part): row = part.rawValue
111-
case .connect: row = 0
105+
let row: Int = switch self {
106+
case let .account(part): part.rawValue
107+
case let .imap(part): part.rawValue
108+
case let .smtp(part): part.rawValue
109+
case let .other(part): part.rawValue
110+
case .connect: 0
112111
}
113112
return IndexPath(row: row, section: self.section)
114113
}

FlowCrypt/Controllers/Threads/ThreadDetailsViewController+TableView.swift

+4-5
Original file line numberDiff line numberDiff line change
@@ -170,13 +170,12 @@ extension ThreadDetailsViewController {
170170
private func draftNode(messageIndex: Int, isExpanded: Bool) -> ASCellNode {
171171
let data = input[messageIndex]
172172

173-
let body: String
174-
if let processedMessage = data.processedMessage {
175-
body = processedMessage.text
173+
let body: String = if let processedMessage = data.processedMessage {
174+
processedMessage.text
176175
} else if data.rawMessage.isPgp {
177-
body = "Waiting for pass phrase to open draft..."
176+
"Waiting for pass phrase to open draft..."
178177
} else {
179-
body = data.rawMessage.body.text
178+
data.rawMessage.body.text
180179
}
181180

182181
return ThreadMessageDraftCellNode(sender: appContext.user.name, draftBody: body, messageIndex: messageIndex, action: {

FlowCrypt/Controllers/Threads/ThreadDetailsViewController.swift

+6-9
Original file line numberDiff line numberDiff line change
@@ -180,12 +180,10 @@ final class ThreadDetailsViewController: TableNodeViewController {
180180
onlyLocalKeys: Bool = false,
181181
forceFetch: Bool = true
182182
) async throws -> ProcessedMessage {
183-
let message: Message
184-
185-
if !forceFetch, let rawMessage = input.first(where: { $0.rawMessage.identifier == identifier })?.rawMessage {
186-
message = rawMessage
183+
let message: Message = if !forceFetch, let rawMessage = input.first(where: { $0.rawMessage.identifier == identifier })?.rawMessage {
184+
rawMessage
187185
} else {
188-
message = try await messageHelper.fetchMessage(
186+
try await messageHelper.fetchMessage(
189187
identifier: identifier,
190188
folder: inboxItem.folderPath
191189
)
@@ -309,11 +307,10 @@ final class ThreadDetailsViewController: TableNodeViewController {
309307

310308
let processedMessage = try await getAndProcessMessage(identifier: messageId)
311309

312-
let section: Int
313-
if let index = input.firstIndex(where: { $0.rawMessage.identifier == identifier.draftMessageId }) {
314-
section = index + 1
310+
let section: Int = if let index = input.firstIndex(where: { $0.rawMessage.identifier == identifier.draftMessageId }) {
311+
index + 1
315312
} else {
316-
section = input.count + 1
313+
input.count + 1
317314
}
318315

319316
handle(processedMessage: processedMessage, at: IndexPath(row: 0, section: section))

0 commit comments

Comments
 (0)