Skip to content

Commit ffefb25

Browse files
author
Marino Faggiana
authored
Version 5.3.0 (#2930)
--------- Signed-off-by: Marino Faggiana <[email protected]> Signed-off-by: Milen Pivchev <[email protected]> Signed-off-by: Nextcloud bot <[email protected]> Signed-off-by: Milen Pivchev <[email protected]> Signed-off-by: Marco Ambrosini <[email protected]> Signed-off-by: Claudio Cambra <[email protected]>
1 parent 08d7f76 commit ffefb25

File tree

603 files changed

+4889
-5331
lines changed

Some content is hidden

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

603 files changed

+4889
-5331
lines changed

.github/workflows/additional-targets.yml

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,23 +11,22 @@ on:
1111
- master
1212
- develop
1313

14+
concurrency:
15+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
16+
cancel-in-progress: true
17+
1418
jobs:
1519
build-and-test:
1620
name: Build and Test
17-
runs-on: macos-latest
21+
runs-on: macos-14
1822
if: github.event.pull_request.draft == false
1923
env:
2024
PROJECT: Nextcloud.xcodeproj
21-
DESTINATION: platform=iOS Simulator,name=iPhone 14
25+
DESTINATION: platform=iOS Simulator,name=iPhone 15
2226
steps:
2327
- name: Set env var
2428
run: echo "DEVELOPER_DIR=$(xcode-select --print-path)" >> $GITHUB_ENV
25-
- uses: actions/checkout@v3
26-
- name: Setup Bundler and Install Gems
27-
run: |
28-
gem install bundler
29-
bundle install
30-
bundle update
29+
- uses: actions/checkout@v4
3130
- name: Restore Carhage Cache
3231
uses: actions/cache@v3
3332
id: carthage-cache
@@ -43,26 +42,26 @@ jobs:
4342
run: wget "https://raw.githubusercontent.com/firebase/quickstart-ios/master/mock-GoogleService-Info.plist" -O GoogleService-Info.plist
4443
- name: Build iOS Share
4544
run: |
46-
xcodebuild build -project $PROJECT -scheme "$SCHEME" -destination "$DESTINATION" | xcpretty
45+
xcodebuild build -project $PROJECT -scheme "$SCHEME" -destination "$DESTINATION" | xcbeautify --quieter
4746
env:
4847
SCHEME: Share
4948
- name: Build iOS File Extension
5049
run: |
51-
xcodebuild build -project $PROJECT -scheme "$SCHEME" -destination "$DESTINATION" | xcpretty
50+
xcodebuild build -project $PROJECT -scheme "$SCHEME" -destination "$DESTINATION" | xcbeautify --quieter
5251
env:
5352
SCHEME: File Provider Extension
5453
- name: Build iOS Notification Extension
5554
run: |
56-
xcodebuild build -project $PROJECT -scheme "$SCHEME" -destination "$DESTINATION" | xcpretty
55+
xcodebuild build -project $PROJECT -scheme "$SCHEME" -destination "$DESTINATION" | xcbeautify --quieter
5756
env:
5857
SCHEME: Notification Service Extension
5958
- name: Build iOS Widget
6059
run: |
61-
xcodebuild build -project $PROJECT -scheme "$SCHEME" -destination "$DESTINATION" | xcpretty
60+
xcodebuild build -project $PROJECT -scheme "$SCHEME" -destination "$DESTINATION" | xcbeautify --quieter
6261
env:
6362
SCHEME: Widget
6463
- name: Build iOS Widget Dashboard IntentHandler
6564
run: |
66-
xcodebuild build -project $PROJECT -scheme "$SCHEME" -destination "$DESTINATION" | xcpretty
65+
xcodebuild build -project $PROJECT -scheme "$SCHEME" -destination "$DESTINATION" | xcbeautify --quieter
6766
env:
6867
SCHEME: WidgetDashboardIntentHandler

.github/workflows/lint.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,17 @@ on:
1414
- master
1515
- develop
1616

17+
concurrency:
18+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
19+
cancel-in-progress: true
20+
1721
jobs:
1822
Lint:
1923
runs-on: ubuntu-latest
2024
if: github.event.pull_request.draft == false
2125

2226
steps:
23-
- uses: actions/checkout@v3
27+
- uses: actions/checkout@v4
2428

2529
- name: GitHub Action for SwiftLint
2630
uses: norio-nomura/[email protected]

.github/workflows/xcode.xxx

Lines changed: 0 additions & 72 deletions
This file was deleted.

.github/workflows/xcode.yml

Lines changed: 129 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,129 @@
1+
name: Build and test main target
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
- develop
8+
pull_request:
9+
types: [synchronize, opened, reopened, ready_for_review]
10+
branches:
11+
- master
12+
- develop
13+
14+
env:
15+
PROJECT: Nextcloud.xcodeproj
16+
DESTINATION: platform=iOS Simulator,name=iPhone 15,OS=17.2
17+
SCHEME: Nextcloud
18+
SERVER_BRANCH: stable28
19+
PHP_VERSION: 8.2
20+
21+
jobs:
22+
build:
23+
name: Build
24+
runs-on: macos-13
25+
if: github.event.pull_request.draft == false
26+
27+
steps:
28+
- uses: actions/checkout@v4
29+
30+
- name: Restore Carhage Cache
31+
uses: actions/cache@v3
32+
id: carthage-cache
33+
with:
34+
path: Carthage
35+
key: ${{ runner.os }}-carthage-${{ hashFiles('**/Cartfile.resolved') }}
36+
restore-keys: |
37+
${{ runner.os }}-carthage-
38+
39+
- name: Carthage
40+
if: steps.carthage-cache.outputs.cache-hit != 'true'
41+
run: carthage bootstrap --use-xcframeworks --platform iOS
42+
43+
- name: Download GoogleService-Info.plist
44+
run: wget "https://raw.githubusercontent.com/firebase/quickstart-ios/master/mock-GoogleService-Info.plist" -O GoogleService-Info.plist
45+
46+
- name: Build Nextcloud iOS
47+
run: |
48+
set -o pipefail && \
49+
xcodebuild build-for-testing \
50+
-scheme "${{ env.SCHEME }}" \
51+
-destination "${{ env.DESTINATION }}" \
52+
-derivedDataPath "DerivedData" \
53+
| xcbeautify --quieter
54+
55+
- name: Upload test build
56+
uses: actions/upload-artifact@v4
57+
with:
58+
name: Nextcloud iOS
59+
path: DerivedData/Build/Products
60+
retention-days: 4
61+
62+
test:
63+
name: Test
64+
runs-on: macos-13
65+
needs: [build]
66+
67+
if: github.event.pull_request.draft == false
68+
69+
steps:
70+
- uses: actions/checkout@v4
71+
72+
- name: Set up php ${{ env.PHP_VERSION }}
73+
uses: shivammathur/setup-php@8872c784b04a1420e81191df5d64fbd59d3d3033 # v2.30.0
74+
with:
75+
php-version: ${{ env.PHP_VERSION }}
76+
# https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation
77+
extensions: apcu, bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, pgsql, pdo_pgsql
78+
coverage: none
79+
ini-file: development
80+
# Temporary workaround for missing pcntl_* in PHP 8.3: ini-values: apc.enable_cli=on
81+
ini-values: apc.enable_cli=on, disable_functions=
82+
83+
- name: Checkout server
84+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
85+
with:
86+
submodules: true
87+
repository: nextcloud/server
88+
path: server
89+
ref: ${{ env.SERVER_BRANCH }}
90+
91+
- name: Set up Nextcloud
92+
run: |
93+
mkdir server/data
94+
./server/occ maintenance:install --verbose --database=sqlite --database-name=nextcloud --database-host=127.0.0.1 --database-user=root --database-pass=rootpassword --admin-user admin --admin-pass admin
95+
./server/occ config:system:set hashing_default_password --value=true --type=boolean
96+
./server/occ config:system:set auth.bruteforce.protection.enabled --value false --type bool
97+
./server/occ config:system:set ratelimit.protection.enabled --value false --type bool
98+
./server/occ config:system:set memcache.local --value="\\OC\\Memcache\\APCu"
99+
./server/occ config:system:set memcache.distributed --value="\\OC\\Memcache\\APCu"
100+
./server/occ background:cron
101+
PHP_CLI_SERVER_WORKERS=5 php -S localhost:8080 -t server/ &
102+
103+
- name: Download test build
104+
uses: actions/download-artifact@v4
105+
with:
106+
name: Nextcloud iOS
107+
108+
- name: Check server status
109+
run: curl -s --retry 5 --retry-delay 60 --retry-all-errors http://localhost:8080/status.php || true
110+
111+
- name: Test Nextcloud iOS
112+
run: |
113+
set -o pipefail && \
114+
xcodebuild test-without-building \
115+
-xctestrun $(find . -type f -name "*.xctestrun") \
116+
-destination "${{ env.DESTINATION }}" \
117+
-derivedDataPath "DerivedData" \
118+
-test-iterations 3 \
119+
-retry-tests-on-failure \
120+
-resultBundlePath "TestResult.xcresult" \
121+
| xcbeautify --quieter
122+
123+
- name: Upload test results
124+
uses: actions/upload-artifact@v4
125+
if: ${{ !cancelled() }}
126+
with:
127+
name: TestResult.xcresult
128+
path: "TestResult.xcresult"
129+

.slather.yml

Lines changed: 0 additions & 3 deletions
This file was deleted.

.swiftlint.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,5 +44,6 @@ excluded:
4444
- Brand/NCBrand.swift
4545
- iOSClient/NCGlobal.swift
4646
- iOSClient/Utility/NCLivePhoto.swift
47-
47+
- DerivedData
48+
4849
reporter: "xcode"

Brand/Database.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,4 @@ import Foundation
2626
// Database Realm
2727
//
2828
let databaseName = "nextcloud.realm"
29-
let databaseSchemaVersion: UInt64 = 346
29+
let databaseSchemaVersion: UInt64 = 347

Brand/Intro/NCIntroViewController.swift

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ class NCIntroViewController: UIViewController, UICollectionViewDataSource, UICol
3434
@IBOutlet weak var pageControl: UIPageControl!
3535

3636
@objc weak var delegate: NCIntroViewController?
37+
3738
private let appDelegate = (UIApplication.shared.delegate as? AppDelegate)!
3839
private let titles = [NSLocalizedString("_intro_1_title_", comment: ""), NSLocalizedString("_intro_2_title_", comment: ""), NSLocalizedString("_intro_3_title_", comment: ""), NSLocalizedString("_intro_4_title_", comment: "")]
3940
private let images = [UIImage(named: "intro1"), UIImage(named: "intro2"), UIImage(named: "intro3"), UIImage(named: "intro4")]
@@ -113,8 +114,11 @@ class NCIntroViewController: UIViewController, UICollectionViewDataSource, UICol
113114
}
114115

115116
override func viewWillTransition(to size: CGSize, with coordinator: UIViewControllerTransitionCoordinator) {
116-
pageControl.currentPage = 0
117-
introCollectionView.collectionViewLayout.invalidateLayout()
117+
super.viewWillTransition(to: size, with: coordinator)
118+
coordinator.animate(alongsideTransition: nil) { _ in
119+
self.pageControl?.currentPage = 0
120+
self.introCollectionView?.collectionViewLayout.invalidateLayout()
121+
}
118122
}
119123

120124
@objc func autoScroll() {
@@ -158,11 +162,11 @@ class NCIntroViewController: UIViewController, UICollectionViewDataSource, UICol
158162
}
159163

160164
@IBAction func login(_ sender: Any) {
161-
appDelegate.openLogin(viewController: navigationController, selector: NCGlobal.shared.introLogin, openLoginWeb: false)
165+
appDelegate.openLogin(selector: NCGlobal.shared.introLogin, openLoginWeb: false)
162166
}
163167

164168
@IBAction func signup(_ sender: Any) {
165-
appDelegate.openLogin(viewController: navigationController, selector: NCGlobal.shared.introSignup, openLoginWeb: false)
169+
appDelegate.openLogin(selector: NCGlobal.shared.introSignup, openLoginWeb: false)
166170
}
167171

168172
@IBAction func host(_ sender: Any) {

Brand/NCBrand.swift

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ class NCBrandColor: NSObject {
149149
@objc public let customer: UIColor = UIColor(red: 0.0 / 255.0, green: 130.0 / 255.0, blue: 201.0 / 255.0, alpha: 1.0) // BLU NC : #0082c9
150150
@objc public var customerText: UIColor = .white
151151

152-
@objc public var brand: UIColor // don't touch me
152+
@objc private var brand: UIColor // don't touch me
153153
@objc public var brandElement: UIColor // don't touch me
154154
@objc public var brandText: UIColor // don't touch me
155155

@@ -161,12 +161,37 @@ class NCBrandColor: NSObject {
161161
public var themingColorElement: String = ""
162162
public var themingColorText: String = ""
163163

164+
@objc public let iconImageColor: UIColor = .label
165+
@objc public let iconImageColor2: UIColor = .secondaryLabel
166+
@objc public let iconImageMultiColors: [UIColor] = [.secondaryLabel, .label]
167+
168+
@objc public let textColor: UIColor = .label
169+
@objc public let textColor2: UIColor = .secondaryLabel
170+
164171
@objc public var systemMint: UIColor {
165172
get {
166173
return UIColor(red: 0.0 / 255.0, green: 199.0 / 255.0, blue: 190.0 / 255.0, alpha: 1.0)
167174
}
168175
}
169176

177+
@objc public var documentIconColor: UIColor {
178+
get {
179+
return UIColor(hex: "#49abe9")!
180+
}
181+
}
182+
183+
@objc public var spreadsheetIconColor: UIColor {
184+
get {
185+
return UIColor(hex: "#9abd4e")!
186+
}
187+
}
188+
189+
@objc public var presentationIconColor: UIColor {
190+
get {
191+
return UIColor(hex: "#f0965f")!
192+
}
193+
}
194+
170195
override init() {
171196
brand = customer
172197
brandElement = customer

0 commit comments

Comments
 (0)