Skip to content

Commit 715040e

Browse files
DevelopVersion 6.3.0 (#3335)
1 parent 82d6dfe commit 715040e

File tree

252 files changed

+3505
-1597
lines changed

Some content is hidden

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

252 files changed

+3505
-1597
lines changed

.github/workflows/xcode.yml

Lines changed: 48 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,21 @@ on:
66
- master
77
- develop
88
pull_request:
9-
types: [synchronize, opened, reopened, ready_for_review]
9+
types:
10+
- synchronize
11+
- opened
12+
- reopened
13+
- ready_for_review
1014
branches:
1115
- master
1216
- develop
1317

1418
env:
1519
PROJECT: Nextcloud.xcodeproj
16-
DESTINATION: platform=iOS Simulator,name=iPhone 16,OS=18.1
20+
DESTINATION: platform=iOS Simulator,name=iPhone 16,OS=18.2
1721
SCHEME: Nextcloud
18-
SERVER_BRANCH: stable28
19-
PHP_VERSION: 8.2
22+
SERVER_BRANCH: stable30
23+
PHP_VERSION: 8.3
2024

2125
jobs:
2226
build:
@@ -30,7 +34,7 @@ jobs:
3034
- name: Download GoogleService-Info.plist
3135
run: wget "https://raw.githubusercontent.com/firebase/quickstart-ios/master/mock-GoogleService-Info.plist" -O GoogleService-Info.plist
3236

33-
- name: Build Nextcloud iOS
37+
- name: Run Xcode Build
3438
run: |
3539
set -o pipefail && \
3640
xcodebuild build-for-testing \
@@ -39,43 +43,51 @@ jobs:
3943
-derivedDataPath "DerivedData" \
4044
| xcbeautify --quieter
4145
42-
- name: Upload test build
46+
- name: Upload Build Products
4347
uses: actions/upload-artifact@v4
4448
with:
45-
name: Nextcloud iOS
49+
name: Nextcloud for iOS
4650
path: DerivedData/Build/Products
4751
retention-days: 4
4852

4953
test:
50-
name: Test
54+
name: Run Tests
5155
runs-on: macos-15
5256
needs: [build]
5357

54-
if: github.event.pull_request.draft == false
58+
# Temporarily, project has no effective tests except UI tests which are unfeasible on virtualized GitHub runners (see #3291)
59+
# Previously: github.event.pull_request.draft == false
60+
if: false
5561

5662
steps:
5763
- uses: actions/checkout@v4
5864

59-
- name: Set up php ${{ env.PHP_VERSION }}
60-
uses: shivammathur/setup-php@8872c784b04a1420e81191df5d64fbd59d3d3033 # v2.30.0
65+
- name: Prepare PHP ${{ env.PHP_VERSION }}
66+
uses: shivammathur/setup-php@v2
6167
with:
6268
php-version: ${{ env.PHP_VERSION }}
6369
# https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation
6470
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
6571
coverage: none
6672
ini-file: development
67-
# Temporary workaround for missing pcntl_* in PHP 8.3: ini-values: apc.enable_cli=on
6873
ini-values: apc.enable_cli=on, disable_functions=
6974

70-
- name: Checkout server
71-
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
75+
- name: Checkout Nextcloud Server
76+
uses: actions/checkout@v4
7277
with:
7378
submodules: true
7479
repository: nextcloud/server
7580
path: server
7681
ref: ${{ env.SERVER_BRANCH }}
7782

78-
- name: Set up Nextcloud
83+
- name: Checkout Download Limits App
84+
uses: actions/checkout@v4
85+
with:
86+
repository: nextcloud/files_downloadlimit
87+
path: server/apps/files_downloadlimit
88+
ref: ${{ env.SERVER_BRANCH }}
89+
90+
- name: Install Nextcloud Server
7991
run: |
8092
mkdir server/data
8193
./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
@@ -84,18 +96,33 @@ jobs:
8496
./server/occ config:system:set ratelimit.protection.enabled --value false --type bool
8597
./server/occ config:system:set memcache.local --value="\\OC\\Memcache\\APCu"
8698
./server/occ config:system:set memcache.distributed --value="\\OC\\Memcache\\APCu"
99+
./server/occ app:enable files_downloadlimit
87100
./server/occ background:cron
88101
PHP_CLI_SERVER_WORKERS=5 php -S localhost:8080 -t server/ &
89102
90-
- name: Download test build
103+
- name: Download Build
91104
uses: actions/download-artifact@v4
92105
with:
93-
name: Nextcloud iOS
106+
name: Nextcloud for iOS
94107

95-
- name: Check server status
108+
- name: Assert Nextcloud Server Status
96109
run: curl -s --retry 5 --retry-delay 60 --retry-all-errors http://localhost:8080/status.php || true
97110

98-
- name: Test Nextcloud iOS
111+
- name: Boot iOS Simulator
112+
run: |
113+
xcrun simctl boot "iPhone 16"
114+
xcrun simctl bootstatus "iPhone 16" || echo "Simulator booted"
115+
116+
- name: Check if Safari is installed
117+
run: |
118+
if xcrun simctl listapps booted | grep -q com.apple.mobilesafari; then
119+
echo "Safari is installed in the simulator."
120+
else
121+
echo "Safari is NOT installed in the simulator."
122+
exit 1
123+
fi
124+
125+
- name: Run Xcode Test
99126
run: |
100127
set -o pipefail && \
101128
xcodebuild test-without-building \
@@ -104,13 +131,11 @@ jobs:
104131
-derivedDataPath "DerivedData" \
105132
-test-iterations 3 \
106133
-retry-tests-on-failure \
107-
-resultBundlePath "TestResult.xcresult" \
108-
| xcbeautify --quieter
134+
-resultBundlePath "TestResult.xcresult"
109135
110-
- name: Upload test results
136+
- name: Upload Xcode Test Results
111137
uses: actions/upload-artifact@v4
112138
if: ${{ !cancelled() }}
113139
with:
114140
name: TestResult.xcresult
115141
path: "TestResult.xcresult"
116-

Brand/Database.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,5 @@ import Foundation
2626
// Database Realm
2727
//
2828
let databaseName = "nextcloud.realm"
29-
let databaseSchemaVersion: UInt64 = 375
29+
let tableAccountBackup = "tableAccountBackup.json"
30+
let databaseSchemaVersion: UInt64 = 379

Brand/Intro/NCIntro.storyboard

Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="15702" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="QS9-pa-PcE">
2+
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="23504" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="QS9-pa-PcE">
33
<device id="retina6_1" orientation="portrait" appearance="light"/>
44
<dependencies>
55
<deployment identifier="iOS"/>
6-
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15704"/>
6+
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="23506"/>
77
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
8+
<capability name="System colors in document resources" minToolsVersion="11.0"/>
89
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
910
</dependencies>
1011
<scenes>
@@ -17,10 +18,11 @@
1718
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
1819
<subviews>
1920
<collectionView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" pagingEnabled="YES" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" dataMode="prototypes" translatesAutoresizingMaskIntoConstraints="NO" id="o6I-qu-IDh">
20-
<rect key="frame" x="8" y="104" width="398" height="398"/>
21+
<rect key="frame" x="8" y="108" width="398" height="398"/>
2122
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
2223
<constraints>
2324
<constraint firstAttribute="width" secondItem="o6I-qu-IDh" secondAttribute="height" multiplier="1:1" priority="750" id="N8S-l1-3ac"/>
25+
<constraint firstAttribute="width" secondItem="o6I-qu-IDh" secondAttribute="height" multiplier="1:1" priority="750" id="tPF-eA-Pcb"/>
2426
</constraints>
2527
<collectionViewFlowLayout key="collectionViewLayout" scrollDirection="horizontal" minimumLineSpacing="0.0" minimumInteritemSpacing="0.0" id="VRH-dG-Ra1">
2628
<size key="itemSize" width="0.0" height="0.0"/>
@@ -30,14 +32,15 @@
3032
</collectionViewFlowLayout>
3133
</collectionView>
3234
<pageControl opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" numberOfPages="3" translatesAutoresizingMaskIntoConstraints="NO" id="Eu1-Gv-7Jx">
33-
<rect key="frame" x="187.5" y="510" width="39" height="10"/>
35+
<rect key="frame" x="170" y="514" width="74" height="10"/>
3436
<constraints>
3537
<constraint firstAttribute="height" constant="10" id="6xY-X5-z4w"/>
3638
<constraint firstAttribute="height" relation="greaterThanOrEqual" constant="10" id="HuN-3g-bM7"/>
3739
</constraints>
3840
</pageControl>
39-
<button opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Yyc-bK-mqW">
40-
<rect key="frame" x="72" y="584" width="270" height="40"/>
41+
<button opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Yyc-bK-mqW">
42+
<rect key="frame" x="72" y="588" width="270" height="40"/>
43+
<accessibility key="accessibilityConfiguration" identifier="login"/>
4144
<constraints>
4245
<constraint firstAttribute="height" constant="40" id="h0h-Pp-A9q"/>
4346
<constraint firstAttribute="width" constant="270" id="mXS-9b-u5o"/>
@@ -48,19 +51,19 @@
4851
<action selector="login:" destination="QS9-pa-PcE" eventType="touchUpInside" id="Lb4-EV-uT9"/>
4952
</connections>
5053
</button>
51-
<button opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="N4X-JQ-1c1">
52-
<rect key="frame" x="72" y="632" width="270" height="40"/>
54+
<button opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="N4X-JQ-1c1">
55+
<rect key="frame" x="72" y="636" width="270" height="40"/>
5356
<constraints>
5457
<constraint firstAttribute="height" constant="40" id="Z1i-8h-Kkj"/>
5558
<constraint firstAttribute="width" constant="270" id="ski-k5-xeL"/>
5659
</constraints>
5760
<fontDescription key="fontDescription" type="system" pointSize="14"/>
5861
<state key="normal" title="Signup"/>
5962
<connections>
60-
<action selector="signup:" destination="QS9-pa-PcE" eventType="touchUpInside" id="wKo-W5-MBd"/>
63+
<action selector="signupWithProvider:" destination="QS9-pa-PcE" eventType="touchUpInside" id="wKo-W5-MBd"/>
6164
</connections>
6265
</button>
63-
<button opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Z5d-gx-rTR">
66+
<button opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Z5d-gx-rTR">
6467
<rect key="frame" x="72" y="832" width="270" height="30"/>
6568
<constraints>
6669
<constraint firstAttribute="width" constant="270" id="rtc-VW-fLA"/>
@@ -73,7 +76,8 @@
7376
</connections>
7477
</button>
7578
</subviews>
76-
<color key="backgroundColor" systemColor="opaqueSeparatorColor" red="0.77647058820000003" green="0.77647058820000003" blue="0.7843137255" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
79+
<viewLayoutGuide key="safeArea" id="Yku-CN-snD"/>
80+
<color key="backgroundColor" systemColor="opaqueSeparatorColor"/>
7781
<constraints>
7882
<constraint firstItem="Z5d-gx-rTR" firstAttribute="centerX" secondItem="Xnz-EW-9gg" secondAttribute="centerX" id="5JN-bZ-Cfc"/>
7983
<constraint firstItem="Z5d-gx-rTR" firstAttribute="top" relation="greaterThanOrEqual" secondItem="N4X-JQ-1c1" secondAttribute="bottom" constant="8" id="5bf-uK-zTE"/>
@@ -91,9 +95,7 @@
9195
<variation key="heightClass=compact" constant="8"/>
9296
</constraint>
9397
<constraint firstItem="Eu1-Gv-7Jx" firstAttribute="centerX" secondItem="Xnz-EW-9gg" secondAttribute="centerX" id="rML-gL-iXA"/>
94-
<constraint firstItem="o6I-qu-IDh" firstAttribute="width" secondItem="o6I-qu-IDh" secondAttribute="height" multiplier="1:1" priority="750" id="tPF-eA-Pcb"/>
9598
</constraints>
96-
<viewLayoutGuide key="safeArea" id="Yku-CN-snD"/>
9799
</view>
98100
<connections>
99101
<outlet property="buttonHost" destination="Z5d-gx-rTR" id="Ngu-DS-yLh"/>
@@ -108,4 +110,9 @@
108110
<point key="canvasLocation" x="-158" y="123"/>
109111
</scene>
110112
</scenes>
113+
<resources>
114+
<systemColor name="opaqueSeparatorColor">
115+
<color red="0.77647058823529413" green="0.77647058823529413" blue="0.78431372549019607" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
116+
</systemColor>
117+
</resources>
111118
</document>

Brand/Intro/NCIntroViewController.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,8 +192,8 @@ class NCIntroViewController: UIViewController, UICollectionViewDataSource, UICol
192192
appDelegate.openLogin(selector: NCGlobal.shared.introLogin)
193193
}
194194

195-
@IBAction func signup(_ sender: Any) {
196-
appDelegate.openLogin(selector: NCGlobal.shared.introSignup)
195+
@IBAction func signupWithProvider(_ sender: Any) {
196+
appDelegate.openLogin(selector: NCGlobal.shared.introSignUpWithProvider)
197197
}
198198

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

Brand/NCBrand.swift

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,11 @@ let userAgent: String = {
2929
return "Mozilla/5.0 (iOS) Nextcloud-iOS/\(appVersion)"
3030
}()
3131

32-
@objc class NCBrandOptions: NSObject {
33-
@objc static let shared: NCBrandOptions = {
34-
let instance = NCBrandOptions()
35-
return instance
36-
}()
32+
final class NCBrandOptions: @unchecked Sendable {
33+
static let shared = NCBrandOptions()
3734

3835
var brand: String = "Nextcloud"
39-
var textCopyrightNextcloudiOS: String = "Nextcloud Hydrogen for iOS %@ © 2024"
36+
var textCopyrightNextcloudiOS: String = "Nextcloud Hydrogen for iOS %@ © 2025"
4037
var textCopyrightNextcloudServer: String = "Nextcloud Server %@"
4138
var loginBaseUrl: String = "https://cloud.nextcloud.com"
4239
var pushNotificationServerProxy: String = "https://push-notifications.nextcloud.com"
@@ -56,10 +53,10 @@ let userAgent: String = {
5653
var capabilitiesGroupApps: String = "group.com.nextcloud.apps"
5754

5855
// BRAND ONLY
59-
@objc public var use_AppConfig: Bool = false // Don't touch me !!
56+
var use_AppConfig: Bool = false // Don't touch me !!
6057

6158
// Use server theming color
62-
@objc public var use_themingColor: Bool = true
59+
var use_themingColor: Bool = true
6360

6461
var disable_intro: Bool = false
6562
var disable_request_login_url: Bool = false
@@ -73,7 +70,6 @@ let userAgent: String = {
7370
var doNotAskPasscodeAtStartup: Bool = false
7471
var disable_source_code_in_settings: Bool = false
7572
var enforce_passcode_lock = false
76-
var use_in_app_browser_for_login = false
7773

7874
// (name: "Name 1", url: "https://cloud.nextcloud.com"),(name: "Name 2", url: "https://cloud.nextcloud.com")
7975
var enforce_servers: [(name: String, url: String)] = []
@@ -95,7 +91,7 @@ let userAgent: String = {
9591
case activity, sharing
9692
}
9793

98-
override init() {
94+
init() {
9995
// wrapper AppConfig
10096
if let configurationManaged = UserDefaults.standard.dictionary(forKey: "com.apple.configuration.managed"), use_AppConfig {
10197
if let str = configurationManaged[NCGlobal.shared.configuration_brand] as? String {
@@ -123,18 +119,19 @@ let userAgent: String = {
123119
enforce_passcode_lock = (str as NSString).boolValue
124120
}
125121
}
122+
123+
#if DEBUG
124+
pushNotificationServerProxy = "https://c0004.customerpush.nextcloud.com"
125+
#endif
126126
}
127127

128128
@objc func getUserAgent() -> String {
129129
return userAgent
130130
}
131131
}
132132

133-
class NCBrandColor: NSObject {
134-
static let shared: NCBrandColor = {
135-
let instance = NCBrandColor()
136-
return instance
137-
}()
133+
final class NCBrandColor: @unchecked Sendable {
134+
static let shared = NCBrandColor()
138135

139136
/// This is rewrited from customet theme, default is Nextcloud color
140137
///
@@ -179,7 +176,7 @@ class NCBrandColor: NSObject {
179176
}
180177
}
181178

182-
override init() { }
179+
init() { }
183180

184181
/**
185182
Generate colors from the official nextcloud color.

File Provider Extension/FileProviderData.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ class fileProviderData: NSObject {
103103

104104
self.account = tblAccount.account
105105
/// NextcloudKit Session
106-
NextcloudKit.shared.setup(delegate: NCNetworking.shared)
106+
NextcloudKit.shared.setup(groupIdentifier: NCBrandOptions.shared.capabilitiesGroup, delegate: NCNetworking.shared)
107107
NextcloudKit.shared.appendSession(account: tblAccount.account,
108108
urlBase: tblAccount.urlBase,
109109
user: tblAccount.user,
@@ -115,7 +115,6 @@ class fileProviderData: NSObject {
115115
httpMaximumConnectionsPerHostInDownload: NCBrandOptions.shared.httpMaximumConnectionsPerHostInDownload,
116116
httpMaximumConnectionsPerHostInUpload: NCBrandOptions.shared.httpMaximumConnectionsPerHostInUpload,
117117
groupIdentifier: NCBrandOptions.shared.capabilitiesGroup)
118-
NCNetworking.shared.delegate = providerExtension as? NCNetworkingDelegate
119118

120119
return tableAccount(value: tblAccount)
121120
}

0 commit comments

Comments
 (0)