Skip to content

Commit

Permalink
DevelopVersion 6.3.0 (#3335)
Browse files Browse the repository at this point in the history
  • Loading branch information
Marino Faggiana authored Feb 25, 2025
1 parent 82d6dfe commit 715040e
Show file tree
Hide file tree
Showing 252 changed files with 3,505 additions and 1,597 deletions.
71 changes: 48 additions & 23 deletions .github/workflows/xcode.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,21 @@ on:
- master
- develop
pull_request:
types: [synchronize, opened, reopened, ready_for_review]
types:
- synchronize
- opened
- reopened
- ready_for_review
branches:
- master
- develop

env:
PROJECT: Nextcloud.xcodeproj
DESTINATION: platform=iOS Simulator,name=iPhone 16,OS=18.1
DESTINATION: platform=iOS Simulator,name=iPhone 16,OS=18.2
SCHEME: Nextcloud
SERVER_BRANCH: stable28
PHP_VERSION: 8.2
SERVER_BRANCH: stable30
PHP_VERSION: 8.3

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

- name: Build Nextcloud iOS
- name: Run Xcode Build
run: |
set -o pipefail && \
xcodebuild build-for-testing \
Expand All @@ -39,43 +43,51 @@ jobs:
-derivedDataPath "DerivedData" \
| xcbeautify --quieter
- name: Upload test build
- name: Upload Build Products
uses: actions/upload-artifact@v4
with:
name: Nextcloud iOS
name: Nextcloud for iOS
path: DerivedData/Build/Products
retention-days: 4

test:
name: Test
name: Run Tests
runs-on: macos-15
needs: [build]

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

steps:
- uses: actions/checkout@v4

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

- name: Checkout server
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Checkout Nextcloud Server
uses: actions/checkout@v4
with:
submodules: true
repository: nextcloud/server
path: server
ref: ${{ env.SERVER_BRANCH }}

- name: Set up Nextcloud
- name: Checkout Download Limits App
uses: actions/checkout@v4
with:
repository: nextcloud/files_downloadlimit
path: server/apps/files_downloadlimit
ref: ${{ env.SERVER_BRANCH }}

- name: Install Nextcloud Server
run: |
mkdir server/data
./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
Expand All @@ -84,18 +96,33 @@ jobs:
./server/occ config:system:set ratelimit.protection.enabled --value false --type bool
./server/occ config:system:set memcache.local --value="\\OC\\Memcache\\APCu"
./server/occ config:system:set memcache.distributed --value="\\OC\\Memcache\\APCu"
./server/occ app:enable files_downloadlimit
./server/occ background:cron
PHP_CLI_SERVER_WORKERS=5 php -S localhost:8080 -t server/ &
- name: Download test build
- name: Download Build
uses: actions/download-artifact@v4
with:
name: Nextcloud iOS
name: Nextcloud for iOS

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

- name: Test Nextcloud iOS
- name: Boot iOS Simulator
run: |
xcrun simctl boot "iPhone 16"
xcrun simctl bootstatus "iPhone 16" || echo "Simulator booted"
- name: Check if Safari is installed
run: |
if xcrun simctl listapps booted | grep -q com.apple.mobilesafari; then
echo "Safari is installed in the simulator."
else
echo "Safari is NOT installed in the simulator."
exit 1
fi
- name: Run Xcode Test
run: |
set -o pipefail && \
xcodebuild test-without-building \
Expand All @@ -104,13 +131,11 @@ jobs:
-derivedDataPath "DerivedData" \
-test-iterations 3 \
-retry-tests-on-failure \
-resultBundlePath "TestResult.xcresult" \
| xcbeautify --quieter
-resultBundlePath "TestResult.xcresult"
- name: Upload test results
- name: Upload Xcode Test Results
uses: actions/upload-artifact@v4
if: ${{ !cancelled() }}
with:
name: TestResult.xcresult
path: "TestResult.xcresult"

3 changes: 2 additions & 1 deletion Brand/Database.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,5 @@ import Foundation
// Database Realm
//
let databaseName = "nextcloud.realm"
let databaseSchemaVersion: UInt64 = 375
let tableAccountBackup = "tableAccountBackup.json"
let databaseSchemaVersion: UInt64 = 379
33 changes: 20 additions & 13 deletions Brand/Intro/NCIntro.storyboard
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<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">
<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">
<device id="retina6_1" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15704"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="23506"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="System colors in document resources" minToolsVersion="11.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
Expand All @@ -17,10 +18,11 @@
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<collectionView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" pagingEnabled="YES" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" dataMode="prototypes" translatesAutoresizingMaskIntoConstraints="NO" id="o6I-qu-IDh">
<rect key="frame" x="8" y="104" width="398" height="398"/>
<rect key="frame" x="8" y="108" width="398" height="398"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="width" secondItem="o6I-qu-IDh" secondAttribute="height" multiplier="1:1" priority="750" id="N8S-l1-3ac"/>
<constraint firstAttribute="width" secondItem="o6I-qu-IDh" secondAttribute="height" multiplier="1:1" priority="750" id="tPF-eA-Pcb"/>
</constraints>
<collectionViewFlowLayout key="collectionViewLayout" scrollDirection="horizontal" minimumLineSpacing="0.0" minimumInteritemSpacing="0.0" id="VRH-dG-Ra1">
<size key="itemSize" width="0.0" height="0.0"/>
Expand All @@ -30,14 +32,15 @@
</collectionViewFlowLayout>
</collectionView>
<pageControl opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" numberOfPages="3" translatesAutoresizingMaskIntoConstraints="NO" id="Eu1-Gv-7Jx">
<rect key="frame" x="187.5" y="510" width="39" height="10"/>
<rect key="frame" x="170" y="514" width="74" height="10"/>
<constraints>
<constraint firstAttribute="height" constant="10" id="6xY-X5-z4w"/>
<constraint firstAttribute="height" relation="greaterThanOrEqual" constant="10" id="HuN-3g-bM7"/>
</constraints>
</pageControl>
<button opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Yyc-bK-mqW">
<rect key="frame" x="72" y="584" width="270" height="40"/>
<button opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Yyc-bK-mqW">
<rect key="frame" x="72" y="588" width="270" height="40"/>
<accessibility key="accessibilityConfiguration" identifier="login"/>
<constraints>
<constraint firstAttribute="height" constant="40" id="h0h-Pp-A9q"/>
<constraint firstAttribute="width" constant="270" id="mXS-9b-u5o"/>
Expand All @@ -48,19 +51,19 @@
<action selector="login:" destination="QS9-pa-PcE" eventType="touchUpInside" id="Lb4-EV-uT9"/>
</connections>
</button>
<button opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="N4X-JQ-1c1">
<rect key="frame" x="72" y="632" width="270" height="40"/>
<button opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="N4X-JQ-1c1">
<rect key="frame" x="72" y="636" width="270" height="40"/>
<constraints>
<constraint firstAttribute="height" constant="40" id="Z1i-8h-Kkj"/>
<constraint firstAttribute="width" constant="270" id="ski-k5-xeL"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<state key="normal" title="Signup"/>
<connections>
<action selector="signup:" destination="QS9-pa-PcE" eventType="touchUpInside" id="wKo-W5-MBd"/>
<action selector="signupWithProvider:" destination="QS9-pa-PcE" eventType="touchUpInside" id="wKo-W5-MBd"/>
</connections>
</button>
<button opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Z5d-gx-rTR">
<button opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Z5d-gx-rTR">
<rect key="frame" x="72" y="832" width="270" height="30"/>
<constraints>
<constraint firstAttribute="width" constant="270" id="rtc-VW-fLA"/>
Expand All @@ -73,7 +76,8 @@
</connections>
</button>
</subviews>
<color key="backgroundColor" systemColor="opaqueSeparatorColor" red="0.77647058820000003" green="0.77647058820000003" blue="0.7843137255" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<viewLayoutGuide key="safeArea" id="Yku-CN-snD"/>
<color key="backgroundColor" systemColor="opaqueSeparatorColor"/>
<constraints>
<constraint firstItem="Z5d-gx-rTR" firstAttribute="centerX" secondItem="Xnz-EW-9gg" secondAttribute="centerX" id="5JN-bZ-Cfc"/>
<constraint firstItem="Z5d-gx-rTR" firstAttribute="top" relation="greaterThanOrEqual" secondItem="N4X-JQ-1c1" secondAttribute="bottom" constant="8" id="5bf-uK-zTE"/>
Expand All @@ -91,9 +95,7 @@
<variation key="heightClass=compact" constant="8"/>
</constraint>
<constraint firstItem="Eu1-Gv-7Jx" firstAttribute="centerX" secondItem="Xnz-EW-9gg" secondAttribute="centerX" id="rML-gL-iXA"/>
<constraint firstItem="o6I-qu-IDh" firstAttribute="width" secondItem="o6I-qu-IDh" secondAttribute="height" multiplier="1:1" priority="750" id="tPF-eA-Pcb"/>
</constraints>
<viewLayoutGuide key="safeArea" id="Yku-CN-snD"/>
</view>
<connections>
<outlet property="buttonHost" destination="Z5d-gx-rTR" id="Ngu-DS-yLh"/>
Expand All @@ -108,4 +110,9 @@
<point key="canvasLocation" x="-158" y="123"/>
</scene>
</scenes>
<resources>
<systemColor name="opaqueSeparatorColor">
<color red="0.77647058823529413" green="0.77647058823529413" blue="0.78431372549019607" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</systemColor>
</resources>
</document>
4 changes: 2 additions & 2 deletions Brand/Intro/NCIntroViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,8 @@ class NCIntroViewController: UIViewController, UICollectionViewDataSource, UICol
appDelegate.openLogin(selector: NCGlobal.shared.introLogin)
}

@IBAction func signup(_ sender: Any) {
appDelegate.openLogin(selector: NCGlobal.shared.introSignup)
@IBAction func signupWithProvider(_ sender: Any) {
appDelegate.openLogin(selector: NCGlobal.shared.introSignUpWithProvider)
}

@IBAction func host(_ sender: Any) {
Expand Down
29 changes: 13 additions & 16 deletions Brand/NCBrand.swift
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,11 @@ let userAgent: String = {
return "Mozilla/5.0 (iOS) Nextcloud-iOS/\(appVersion)"
}()

@objc class NCBrandOptions: NSObject {
@objc static let shared: NCBrandOptions = {
let instance = NCBrandOptions()
return instance
}()
final class NCBrandOptions: @unchecked Sendable {
static let shared = NCBrandOptions()

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

// BRAND ONLY
@objc public var use_AppConfig: Bool = false // Don't touch me !!
var use_AppConfig: Bool = false // Don't touch me !!

// Use server theming color
@objc public var use_themingColor: Bool = true
var use_themingColor: Bool = true

var disable_intro: Bool = false
var disable_request_login_url: Bool = false
Expand All @@ -73,7 +70,6 @@ let userAgent: String = {
var doNotAskPasscodeAtStartup: Bool = false
var disable_source_code_in_settings: Bool = false
var enforce_passcode_lock = false
var use_in_app_browser_for_login = false

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

override init() {
init() {
// wrapper AppConfig
if let configurationManaged = UserDefaults.standard.dictionary(forKey: "com.apple.configuration.managed"), use_AppConfig {
if let str = configurationManaged[NCGlobal.shared.configuration_brand] as? String {
Expand Down Expand Up @@ -123,18 +119,19 @@ let userAgent: String = {
enforce_passcode_lock = (str as NSString).boolValue
}
}

#if DEBUG
pushNotificationServerProxy = "https://c0004.customerpush.nextcloud.com"
#endif
}

@objc func getUserAgent() -> String {
return userAgent
}
}

class NCBrandColor: NSObject {
static let shared: NCBrandColor = {
let instance = NCBrandColor()
return instance
}()
final class NCBrandColor: @unchecked Sendable {
static let shared = NCBrandColor()

/// This is rewrited from customet theme, default is Nextcloud color
///
Expand Down Expand Up @@ -179,7 +176,7 @@ class NCBrandColor: NSObject {
}
}

override init() { }
init() { }

/**
Generate colors from the official nextcloud color.
Expand Down
3 changes: 1 addition & 2 deletions File Provider Extension/FileProviderData.swift
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ class fileProviderData: NSObject {

self.account = tblAccount.account
/// NextcloudKit Session
NextcloudKit.shared.setup(delegate: NCNetworking.shared)
NextcloudKit.shared.setup(groupIdentifier: NCBrandOptions.shared.capabilitiesGroup, delegate: NCNetworking.shared)
NextcloudKit.shared.appendSession(account: tblAccount.account,
urlBase: tblAccount.urlBase,
user: tblAccount.user,
Expand All @@ -115,7 +115,6 @@ class fileProviderData: NSObject {
httpMaximumConnectionsPerHostInDownload: NCBrandOptions.shared.httpMaximumConnectionsPerHostInDownload,
httpMaximumConnectionsPerHostInUpload: NCBrandOptions.shared.httpMaximumConnectionsPerHostInUpload,
groupIdentifier: NCBrandOptions.shared.capabilitiesGroup)
NCNetworking.shared.delegate = providerExtension as? NCNetworkingDelegate

return tableAccount(value: tblAccount)
}
Expand Down
Loading

0 comments on commit 715040e

Please sign in to comment.