Skip to content

Commit

Permalink
Version 5.3.0 (#2930)
Browse files Browse the repository at this point in the history
---------

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]>
  • Loading branch information
marinofaggiana authored May 25, 2024
1 parent 08d7f76 commit ffefb25
Show file tree
Hide file tree
Showing 603 changed files with 4,889 additions and 5,331 deletions.
25 changes: 12 additions & 13 deletions .github/workflows/additional-targets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,22 @@ on:
- master
- develop

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
build-and-test:
name: Build and Test
runs-on: macos-latest
runs-on: macos-14
if: github.event.pull_request.draft == false
env:
PROJECT: Nextcloud.xcodeproj
DESTINATION: platform=iOS Simulator,name=iPhone 14
DESTINATION: platform=iOS Simulator,name=iPhone 15
steps:
- name: Set env var
run: echo "DEVELOPER_DIR=$(xcode-select --print-path)" >> $GITHUB_ENV
- uses: actions/checkout@v3
- name: Setup Bundler and Install Gems
run: |
gem install bundler
bundle install
bundle update
- uses: actions/checkout@v4
- name: Restore Carhage Cache
uses: actions/cache@v3
id: carthage-cache
Expand All @@ -43,26 +42,26 @@ jobs:
run: wget "https://raw.githubusercontent.com/firebase/quickstart-ios/master/mock-GoogleService-Info.plist" -O GoogleService-Info.plist
- name: Build iOS Share
run: |
xcodebuild build -project $PROJECT -scheme "$SCHEME" -destination "$DESTINATION" | xcpretty
xcodebuild build -project $PROJECT -scheme "$SCHEME" -destination "$DESTINATION" | xcbeautify --quieter
env:
SCHEME: Share
- name: Build iOS File Extension
run: |
xcodebuild build -project $PROJECT -scheme "$SCHEME" -destination "$DESTINATION" | xcpretty
xcodebuild build -project $PROJECT -scheme "$SCHEME" -destination "$DESTINATION" | xcbeautify --quieter
env:
SCHEME: File Provider Extension
- name: Build iOS Notification Extension
run: |
xcodebuild build -project $PROJECT -scheme "$SCHEME" -destination "$DESTINATION" | xcpretty
xcodebuild build -project $PROJECT -scheme "$SCHEME" -destination "$DESTINATION" | xcbeautify --quieter
env:
SCHEME: Notification Service Extension
- name: Build iOS Widget
run: |
xcodebuild build -project $PROJECT -scheme "$SCHEME" -destination "$DESTINATION" | xcpretty
xcodebuild build -project $PROJECT -scheme "$SCHEME" -destination "$DESTINATION" | xcbeautify --quieter
env:
SCHEME: Widget
- name: Build iOS Widget Dashboard IntentHandler
run: |
xcodebuild build -project $PROJECT -scheme "$SCHEME" -destination "$DESTINATION" | xcpretty
xcodebuild build -project $PROJECT -scheme "$SCHEME" -destination "$DESTINATION" | xcbeautify --quieter
env:
SCHEME: WidgetDashboardIntentHandler
6 changes: 5 additions & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,17 @@ on:
- master
- develop

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
Lint:
runs-on: ubuntu-latest
if: github.event.pull_request.draft == false

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: GitHub Action for SwiftLint
uses: norio-nomura/[email protected]
72 changes: 0 additions & 72 deletions .github/workflows/xcode.xxx

This file was deleted.

129 changes: 129 additions & 0 deletions .github/workflows/xcode.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
name: Build and test main target

on:
push:
branches:
- master
- develop
pull_request:
types: [synchronize, opened, reopened, ready_for_review]
branches:
- master
- develop

env:
PROJECT: Nextcloud.xcodeproj
DESTINATION: platform=iOS Simulator,name=iPhone 15,OS=17.2
SCHEME: Nextcloud
SERVER_BRANCH: stable28
PHP_VERSION: 8.2

jobs:
build:
name: Build
runs-on: macos-13
if: github.event.pull_request.draft == false

steps:
- uses: actions/checkout@v4

- name: Restore Carhage Cache
uses: actions/cache@v3
id: carthage-cache
with:
path: Carthage
key: ${{ runner.os }}-carthage-${{ hashFiles('**/Cartfile.resolved') }}
restore-keys: |
${{ runner.os }}-carthage-
- name: Carthage
if: steps.carthage-cache.outputs.cache-hit != 'true'
run: carthage bootstrap --use-xcframeworks --platform iOS

- 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
run: |
set -o pipefail && \
xcodebuild build-for-testing \
-scheme "${{ env.SCHEME }}" \
-destination "${{ env.DESTINATION }}" \
-derivedDataPath "DerivedData" \
| xcbeautify --quieter
- name: Upload test build
uses: actions/upload-artifact@v4
with:
name: Nextcloud iOS
path: DerivedData/Build/Products
retention-days: 4

test:
name: Test
runs-on: macos-13
needs: [build]

if: github.event.pull_request.draft == false

steps:
- uses: actions/checkout@v4

- name: Set up php ${{ env.PHP_VERSION }}
uses: shivammathur/setup-php@8872c784b04a1420e81191df5d64fbd59d3d3033 # v2.30.0
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
with:
submodules: true
repository: nextcloud/server
path: server
ref: ${{ env.SERVER_BRANCH }}

- name: Set up Nextcloud
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
./server/occ config:system:set hashing_default_password --value=true --type=boolean
./server/occ config:system:set auth.bruteforce.protection.enabled --value false --type bool
./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 background:cron
PHP_CLI_SERVER_WORKERS=5 php -S localhost:8080 -t server/ &
- name: Download test build
uses: actions/download-artifact@v4
with:
name: Nextcloud iOS

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

- name: Test Nextcloud iOS
run: |
set -o pipefail && \
xcodebuild test-without-building \
-xctestrun $(find . -type f -name "*.xctestrun") \
-destination "${{ env.DESTINATION }}" \
-derivedDataPath "DerivedData" \
-test-iterations 3 \
-retry-tests-on-failure \
-resultBundlePath "TestResult.xcresult" \
| xcbeautify --quieter
- name: Upload test results
uses: actions/upload-artifact@v4
if: ${{ !cancelled() }}
with:
name: TestResult.xcresult
path: "TestResult.xcresult"

3 changes: 0 additions & 3 deletions .slather.yml

This file was deleted.

3 changes: 2 additions & 1 deletion .swiftlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,6 @@ excluded:
- Brand/NCBrand.swift
- iOSClient/NCGlobal.swift
- iOSClient/Utility/NCLivePhoto.swift

- DerivedData

reporter: "xcode"
2 changes: 1 addition & 1 deletion Brand/Database.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ import Foundation
// Database Realm
//
let databaseName = "nextcloud.realm"
let databaseSchemaVersion: UInt64 = 346
let databaseSchemaVersion: UInt64 = 347
12 changes: 8 additions & 4 deletions Brand/Intro/NCIntroViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ class NCIntroViewController: UIViewController, UICollectionViewDataSource, UICol
@IBOutlet weak var pageControl: UIPageControl!

@objc weak var delegate: NCIntroViewController?

private let appDelegate = (UIApplication.shared.delegate as? AppDelegate)!
private let titles = [NSLocalizedString("_intro_1_title_", comment: ""), NSLocalizedString("_intro_2_title_", comment: ""), NSLocalizedString("_intro_3_title_", comment: ""), NSLocalizedString("_intro_4_title_", comment: "")]
private let images = [UIImage(named: "intro1"), UIImage(named: "intro2"), UIImage(named: "intro3"), UIImage(named: "intro4")]
Expand Down Expand Up @@ -113,8 +114,11 @@ class NCIntroViewController: UIViewController, UICollectionViewDataSource, UICol
}

override func viewWillTransition(to size: CGSize, with coordinator: UIViewControllerTransitionCoordinator) {
pageControl.currentPage = 0
introCollectionView.collectionViewLayout.invalidateLayout()
super.viewWillTransition(to: size, with: coordinator)
coordinator.animate(alongsideTransition: nil) { _ in
self.pageControl?.currentPage = 0
self.introCollectionView?.collectionViewLayout.invalidateLayout()
}
}

@objc func autoScroll() {
Expand Down Expand Up @@ -158,11 +162,11 @@ class NCIntroViewController: UIViewController, UICollectionViewDataSource, UICol
}

@IBAction func login(_ sender: Any) {
appDelegate.openLogin(viewController: navigationController, selector: NCGlobal.shared.introLogin, openLoginWeb: false)
appDelegate.openLogin(selector: NCGlobal.shared.introLogin, openLoginWeb: false)
}

@IBAction func signup(_ sender: Any) {
appDelegate.openLogin(viewController: navigationController, selector: NCGlobal.shared.introSignup, openLoginWeb: false)
appDelegate.openLogin(selector: NCGlobal.shared.introSignup, openLoginWeb: false)
}

@IBAction func host(_ sender: Any) {
Expand Down
27 changes: 26 additions & 1 deletion Brand/NCBrand.swift
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ class NCBrandColor: NSObject {
@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
@objc public var customerText: UIColor = .white

@objc public var brand: UIColor // don't touch me
@objc private var brand: UIColor // don't touch me
@objc public var brandElement: UIColor // don't touch me
@objc public var brandText: UIColor // don't touch me

Expand All @@ -161,12 +161,37 @@ class NCBrandColor: NSObject {
public var themingColorElement: String = ""
public var themingColorText: String = ""

@objc public let iconImageColor: UIColor = .label
@objc public let iconImageColor2: UIColor = .secondaryLabel
@objc public let iconImageMultiColors: [UIColor] = [.secondaryLabel, .label]

@objc public let textColor: UIColor = .label
@objc public let textColor2: UIColor = .secondaryLabel

@objc public var systemMint: UIColor {
get {
return UIColor(red: 0.0 / 255.0, green: 199.0 / 255.0, blue: 190.0 / 255.0, alpha: 1.0)
}
}

@objc public var documentIconColor: UIColor {
get {
return UIColor(hex: "#49abe9")!
}
}

@objc public var spreadsheetIconColor: UIColor {
get {
return UIColor(hex: "#9abd4e")!
}
}

@objc public var presentationIconColor: UIColor {
get {
return UIColor(hex: "#f0965f")!
}
}

override init() {
brand = customer
brandElement = customer
Expand Down
Loading

0 comments on commit ffefb25

Please sign in to comment.