Skip to content

About

No description, website, or topics provided.

Resources

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

Nextcloud Photos for iOS, iPadOS, macOS, visionOS, tvOS and watchOS

A native Apple app for the photos and videos in your Nextcloud: timeline, albums, sharing, places, people, memories, backup and more. It works with the Photos app on Nextcloud 33 and later.

The product and technical specification (the target) is in docs/SPEC.md, what is built so far in docs/STATUS.md, a map of the code in docs/ARCHITECTURE.md. Optional server additions are in docs/SERVER-COMPANION.md, wire-format research notes in docs/reference.

Screenshots

The Mac app, signed in to a test server with sample photos from Wikimedia Commons:

Library timeline with zoom slider and media filter

Places Map
Places grid Photos on a map

Build

Requirements: Xcode 27, XcodeGen.

xcodegen generate          # creates NextcloudPhotos.xcodeproj and the Info.plists from project.yml (not checked in)
open NextcloudPhotos.xcodeproj

Command-line builds without signing:

xcodebuild -scheme NextcloudPhotos -destination 'generic/platform=iOS Simulator' CODE_SIGNING_ALLOWED=NO build
xcodebuild -scheme NextcloudPhotos -destination 'platform=macOS' CODE_SIGN_IDENTITY=- CODE_SIGN_STYLE=Manual DEVELOPMENT_TEAM= build
xcodebuild -scheme NextcloudPhotosTV -destination 'generic/platform=tvOS Simulator' CODE_SIGNING_ALLOWED=NO build
xcodebuild -scheme NextcloudPhotosWatch -destination 'generic/platform=watchOS Simulator' CODE_SIGNING_ALLOWED=NO build

The watch app is also built and embedded by the iOS build of NextcloudPhotos.

Signing with your own Apple ID

The project defaults to Nextcloud's team. To run on your Mac or devices, create Config/Local.xcconfig (git-ignored) from Config/Local.xcconfig.example with your team id and a bundle id you own (not com.nextcloud.photos):

DEVELOPMENT_TEAM = ABCDE12345
PHOTOS_BUNDLE_ID = com.example.nextcloudphotos

Add your Apple ID in Xcode › Settings › Accounts, run xcodegen generate, and press Run.

Debug builds are signed without entitlements on purpose, so that any team, and no team at all, can build and run them. The price: no App Group, no shared keychain and no push, so widgets and extensions cannot see the app's accounts. To test those, register what the next section lists for your own bundle id and add PHOTOS_DEBUG_ENTITLEMENTS = YES to Config/Local.xcconfig. The macOS App Sandbox comes from build settings (ENABLE_APP_SANDBOX), so it is on in every build.

Release builds: what must exist in the Apple developer account

Release builds are signed with the entitlement files (App/NextcloudPhotos.entitlements, on macOS App/NextcloudPhotos-macOS.entitlements, and one per extension). For the official app (team NKUJUXUJ3B):

What Value Needed by
App IDs com.nextcloud.photos, .share, .notification-service, .widgets, .background-upload app and extensions
App IDs (Apple TV) com.nextcloud.photos.tv, com.nextcloud.photos.tv.topshelf the Apple TV app and its Top Shelf (SPEC §15.3). A separate App Store app; for universal purchase with the iPhone app the TV target would use com.nextcloud.photos itself (decision for Nextcloud)
App IDs (Apple Watch) com.nextcloud.photos.watchkitapp, com.nextcloud.photos.watchkitapp.widgets the watch app (shipped inside the iPhone app) and its complication
App Group group.com.nextcloud.photos, enabled on all five App IDs and on the four TV and watch App IDs accounts, databases and caches shared with the extensions; the share extension's uploads that the app finishes; on the TV and the watch (separate devices, same group name) what their Top Shelf and complication show
App Groups of the Files app group.com.nextcloud.apps, group.it.twsweb.Crypto-Cloud, enabled on the app's App ID backup: reading what the Files app already uploaded
Keychain Sharing group $(AppIdentifierPrefix)com.nextcloud.photos (needs no registration; all five targets must be signed by the same team) app passwords and push keys for the extensions
Keychain (Apple TV) group $(AppIdentifierPrefix)com.nextcloud.photos.tv (no registration) the TV's app password
PhotoKit background uploads com.apple.photos.background-upload on com.nextcloud.photos.background-upload (iOS and macOS). The extension point requires it (EXRequiredEntitlements of com.apple.photos.background-upload on macOS 27.3); it is in Extensions/BackgroundUpload/BackgroundUpload.entitlements. Has to be enabled for Nextcloud's App ID (check in the developer portal whether Apple grants it on request, as for the Files app's extension). Without it the system never starts the extension and the backup uses the app's own background session only backup (SPEC §7.18.6)
Push Notifications capability on com.nextcloud.photos, and an APNs key or certificate for it push
Push proxy push-notifications.nextcloud.com must accept the topic com.nextcloud.photos (server side, not in the developer portal) push
Notification filtering com.apple.developer.usernotifications.filtering on the notification service extension. Apple grants it on request only. It is not in the entitlement file yet: add it to Extensions/NotificationService/NotificationService.entitlements once granted. Without it the extension cannot hide notifications of the server that are not about photos push
Provisioning profiles one per App ID and platform (iOS, macOS, visionOS, tvOS, watchOS), or automatic signing with an App Store Connect API key all
Apple TV artwork layered app icon (400×240, 1280×768) and Top Shelf images (1920×720, 2320×720); App/TV/Assets.xcassets has placeholders made from the app icon App Store

The entitlement files say aps-environment = development (macOS: com.apple.developer.aps-environment); exporting an archive for TestFlight or the App Store switches it to production. Version and build number are MARKETING_VERSION and PHOTOS_BUILD_NUMBER in Config/Base.xcconfig; CI overrides the build number on the command line (xcodebuild … PHOTOS_BUILD_NUMBER=123). .github/workflows/release.yml archives all three platforms, unsigned until the signing secrets exist.

App Store declarations (privacy manifest, the App Transport Security exception and its justification for App Review, export compliance) are explained in docs/PRIVACY-AND-EXPORT.md; what the app icon still needs from a designer in docs/APP-ICON.md.

Code layout

All code lives in the local Swift package Packages/PhotosKit; the app target only contains the entry point and resources. The exceptions are the Apple TV app (App/TV, Top Shelf in Extensions/TopShelf) and the Apple Watch app (App/Watch, complication in Extensions/WatchWidgets): their screens are made for the Siri Remote and the watch and share no UI with PhotosAppUI; their logic is in the package (SPEC §15.3).

Module Contents
PhotosModel Value types (media, albums, accounts, server features). No I/O.
PhotosDomain Pure algorithms shared with the web app (timeline sections, stacks, memories, duplicates…).
PhotosNetworking HTTP with certificate trust, WebDAV/SEARCH, OCS, Login Flow v2, feature detection, Photos API.
PhotosStore GRDB database per account, queries, sync engine, outbox.
PhotosMedia Preview cache, image pipeline, originals, BlurHash.
PhotosBackup Camera-roll backup (milestone M3).
PhotosCore Accounts, keychain, per-account services, app and session models.
PhotosAppUI SwiftUI screens and the photo grid (UIKit/AppKit collection views).

Tests

The unit tests need macOS 27 (the package's deployment target). Either of these runs all of them:

cd Packages/PhotosKit
swift test
xcodebuild test -scheme PhotosKit-Package -destination 'platform=macOS'   # what CI runs

With xcodebuild, environment variables only reach the tests with the prefix TEST_RUNNER_ (TEST_RUNNER_PHOTOS_SKIP_PERFORMANCE=1 xcodebuild test … skips the slow timing tests).

All CI jobs run on GitHub's xcode-27 runner (macOS 27), except REUSE (Linux): lint, the unit tests on macOS and in an iOS 27 simulator (a job fails when no test ran), Debug builds for iOS, macOS and visionOS, and an unsigned Release archive of each. A nightly workflow runs the timing tests and the integration tests against a Nextcloud that it installs on the runner.

Integration tests against a real server, UI smoke tests and the manual test plan for devices are described in docs/TESTING.md and docs/test-plan.md. In short:

scripts/test-server.sh /tmp/photos-test-server 8089     # a throw-away Nextcloud with sample photos
PHOTOS_IT_SERVER=http://127.0.0.1:8089 PHOTOS_IT_USER=admin PHOTOS_IT_PASSWORD=admin swift test --no-parallel --filter Integration

Contributing

See CONTRIBUTING.md: pull requests against main, one feature or fix each, signed off (DCO), with tests; Nextcloud's AI contribution policy applies. Security issues: SECURITY.md.

Licence

MIT, see LICENSE. The only third-party dependency is GRDB (MIT). The Nextcloud name and logo are trademarks of Nextcloud GmbH.

About

No description, website, or topics provided.

Resources

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages