Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
5cea285
feat: add shared SwiftUI passcode component
marinofaggiana Oct 22, 2026
78bc603
feat: migrate settings to SwiftUI passcode flow
marinofaggiana Oct 22, 2026
90dc3e1
fix: authenticate E2EE actions with the shared passcode view
marinofaggiana Oct 22, 2026
f33758a
refactor: migrate app passcode flows to NCPasscodeView
marinofaggiana Oct 22, 2026
5597c60
Merge branch 'master' into passcode
marinofaggiana Oct 23, 2026
09786db
refactor: migrate passcode flows to shared SwiftUI components
marinofaggiana Oct 23, 2026
41feee0
Acknowledgements update
marinofaggiana Oct 23, 2026
9429331
fix
marinofaggiana Oct 23, 2026
6f23c17
fix: preserve passcode reset threshold across lockouts
marinofaggiana Oct 23, 2026
c6c833e
fix: keep app passcode lock above sheets and alerts
marinofaggiana Oct 24, 2026
5e15d9a
fix: wait for HTTP fallback in UI test login
marinofaggiana Oct 24, 2026
14de69c
CI
marinofaggiana Oct 24, 2026
87bc765
Merge branch 'passcode' of https://github.com/nextcloud/ios into pass…
marinofaggiana Oct 24, 2026
ebcd3a6
CI
marinofaggiana Oct 24, 2026
a58fce3
CI
marinofaggiana Oct 24, 2026
aab9355
CI
marinofaggiana Oct 24, 2026
162c76c
Merge branch 'master' into passcode
marinofaggiana Oct 24, 2026
c10aef5
size button
marinofaggiana Oct 26, 2026
227f79f
fix: avoid redundant transfer and auto-upload state updates
marinofaggiana Oct 26, 2026
b3ac1d4
added NCPasscodeView.embed
marinofaggiana Oct 26, 2026
a9e021b
fix: correct share extension passcode layout
marinofaggiana Oct 26, 2026
d5e0f35
fix: enforce app lock after failed passcode attempts
marinofaggiana Oct 27, 2026
f02aee8
fix: stabilize passcode UI tests and run them for relevant changes
marinofaggiana Oct 27, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 68 additions & 4 deletions .github/workflows/xcode.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,58 @@ jobs:
test:
name: Run Tests
runs-on: xcode-27
timeout-minutes: 30
needs: [build]

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

steps:
- uses: actions/checkout@v7
with:
fetch-depth: 0

- name: Detect passcode changes
id: passcode_changes
shell: bash
env:
PR_BASE_SHA: ${{ github.event.pull_request.base.sha }}
PR_HEAD_SHA: ${{ github.event.pull_request.head.sha }}
PUSH_BEFORE_SHA: ${{ github.event.before }}
run: |
run_passcode_tests=false
if [ "$GITHUB_EVENT_NAME" = "pull_request" ]; then
compare_base=$(git merge-base "$PR_BASE_SHA" "$PR_HEAD_SHA")
compare_head="$PR_HEAD_SHA"
else
compare_base="$PUSH_BEFORE_SHA"
compare_head="$GITHUB_SHA"
fi

if [ -z "$compare_base" ] || [ "$compare_base" = "0000000000000000000000000000000000000000" ]; then
run_passcode_tests=true
else
git diff --name-only -z "$compare_base" "$compare_head" > "$RUNNER_TEMP/passcode-changed-files"
while IFS= read -r -d '' changed_file; do
case "$changed_file" in
iOSClient/Utility/Passcode/* | \
iOSClient/Settings/Settings/* | \
iOSClient/Settings/NCPreferences.swift | \
iOSClient/SceneDelegate.swift | \
iOSClient/AppDelegate.swift | \
Share/NCShareExtension.swift | \
Brand/* | \
Tests/NextcloudUITests/* | \
Tests/TestConstants.swift | \
Nextcloud.xcodeproj/* | \
.github/workflows/xcode.yml)
run_passcode_tests=true
break
;;
esac
done < "$RUNNER_TEMP/passcode-changed-files"
fi
echo "run=$run_passcode_tests" >> "$GITHUB_OUTPUT"
echo "Run passcode UI tests: $run_passcode_tests"

- name: Setup Xcode
uses: maxim-lobanov/setup-xcode@ed7a3b1fda3918c0306d1b724322adc0b8cc0a90 # v1.7.0
Expand Down Expand Up @@ -103,6 +149,7 @@ jobs:
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 force_language --value=en
./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
Expand All @@ -116,12 +163,17 @@ jobs:
name: Nextcloud for iOS

- name: Assert Nextcloud Server Status
run: curl -s --retry 5 --retry-delay 60 --retry-all-errors http://localhost:8080/status.php || true
run: curl --fail --show-error --silent --max-time 5 --retry 5 --retry-delay 2 --retry-max-time 30 --retry-all-errors http://localhost:8080/status.php

- name: Boot iOS Simulator
run: |
xcrun simctl boot "iPhone 17"
xcrun simctl bootstatus "iPhone 17" || echo "Simulator booted"
xcrun simctl bootstatus "iPhone 17" -b
xcrun simctl spawn "iPhone 17" defaults write NSGlobalDomain AppleLanguages -array en
xcrun simctl spawn "iPhone 17" defaults write NSGlobalDomain AppleLocale -string en_US
xcrun simctl shutdown "iPhone 17"
xcrun simctl boot "iPhone 17"
xcrun simctl bootstatus "iPhone 17" -b

- name: Check if Safari is installed
run: |
Expand All @@ -133,19 +185,31 @@ jobs:
fi

- name: Run Xcode Test
timeout-minutes: 25
shell: bash
env:
RUN_PASSCODE_TESTS: ${{ steps.passcode_changes.outputs.run }}
run: |
set -o pipefail && \
set -o pipefail
test_selection=()
if [ "$RUN_PASSCODE_TESTS" != "true" ]; then
test_selection+=(-skip-testing:NextcloudUITests/PasscodeUITests)
fi
xcodebuild test-without-building \
-xctestrun $(find . -type f -name "*.xctestrun") \
-destination "${{ env.DESTINATION }}" \
-derivedDataPath "DerivedData" \
"${test_selection[@]}" \
-test-iterations 3 \
-retry-tests-on-failure \
-test-timeouts-enabled YES \
-default-test-execution-time-allowance 600 \
-maximum-test-execution-time-allowance 600 \
-resultBundlePath "TestResult.xcresult"

- name: Upload Xcode Test Results
uses: actions/upload-artifact@v7
if: ${{ !cancelled() }}
if: ${{ always() }}
with:
name: TestResult.xcresult
path: "TestResult.xcresult"
1 change: 1 addition & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ Other platforms like Android are irrelevant for this project.
|-----------------|-----------------------------------------------------|----------------------|
| `.github` | GitHub CI workflows (build & test, SwiftLint, extension-target builds) and issue templates. | Keep all three checks green: `xcode.yml` (builds the `Nextcloud` scheme and runs its tests against a Nextcloud server provisioned in CI), `lint.yml` (SwiftLint), `additional-targets.yml` (build-checks the extension schemes). CI skips draft PRs. |
| `iOSClient` | Main iOS client source code. | — |
| `iOSClient/Utility/Passcode` | Shared SwiftUI passcode UI and authentication model for the app and Share Extension; the mandatory app lock uses a dedicated window per scene. | Preserve existing credentials, lockout rules and app/extension reset behavior. |
| `iOSClient/Supporting Files` | Translation files synced with Transifex (see `iOSClient/.tx/config`). | Only add new strings to `en.lproj` (`Localizable.strings`, plurals in `Localizable.stringsdict`); never edit the other `*.lproj` dirs — Transifex overwrites them. |
| `Brand` | Branding layer: `NCBrand.swift` (app constants, colors), `Database.swift` (Realm database name and schema version), Info.plists and entitlements for all targets, launch screen and intro screens. | Bump `databaseSchemaVersion` in `Brand/Database.swift` when changing Realm models. |
| `File Provider Extension` | Contains business logic for the iOS File Provider extension. | — |
Expand Down
Loading
Loading