πŸ“± Nextcloud iOS App
ΠŸΠ΅Ρ€Π΅ΠΉΡ‚ΠΈ ΠΊ Ρ„Π°ΠΉΠ»Ρƒ
Marino Faggiana ffefb25d14
Version 5.3.0 (#2930)
---------

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>
Signed-off-by: Milen Pivchev <milen.pivchev@gmail.com>
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
Signed-off-by: Milen Pivchev <jtodorov_kostadinov@tu-sofia.bg>
Signed-off-by: Marco Ambrosini <marcoambrosini@proton.me>
Signed-off-by: Claudio Cambra <developer@claudiocambra.com>
2024-05-25 09:06:05 +02:00
.github Version 5.3.0 (#2930) 2024-05-25 09:06:05 +02:00
Brand Version 5.3.0 (#2930) 2024-05-25 09:06:05 +02:00
ExternalResources V 5.0.0 (#2768) 2024-02-01 15:28:44 +01:00
File Provider Extension Version 5.3.0 (#2930) 2024-05-25 09:06:05 +02:00
File Provider Extension UI Version 5.3.0 (#2930) 2024-05-25 09:06:05 +02:00
Nextcloud.xcodeproj Version 5.3.0 (#2930) 2024-05-25 09:06:05 +02:00
Notification Service Extension Version 4.9.2 (#2673) 2023-11-20 15:02:35 +01:00
Share Version 5.3.0 (#2930) 2024-05-25 09:06:05 +02:00
Tests Version 5.3.0 (#2930) 2024-05-25 09:06:05 +02:00
Widget Version 5.3.0 (#2930) 2024-05-25 09:06:05 +02:00
WidgetDashboardIntentHandler Version 4.9.2 (#2673) 2023-11-20 15:02:35 +01:00
iOSClient Version 5.3.0 (#2930) 2024-05-25 09:06:05 +02:00
.gitattributes test 2019-05-22 15:27:58 +02:00
.gitignore CI test integration (#2429) 2023-06-22 15:59:55 +02:00
.swiftlint.yml Version 5.3.0 (#2930) 2024-05-25 09:06:05 +02:00
AUTHORS change email 2018-11-29 12:13:29 +01:00
Animation.gif V 5.2.0 (#2833) 2024-03-08 08:21:32 +01:00
CHANGELOG.md Update CHANGELOG.md 2021-02-18 18:14:18 +01:00
CODE_OF_CONDUCT.md update file txt 2018-08-20 11:02:28 +02:00
COPYING.iOS Initial commit 2016-12-02 11:02:06 +01:00
Cartfile WIP 2023-07-06 16:31:32 +02:00
Cartfile.resolved new build 2023-04-26 15:07:53 +02:00
LICENSE.txt update file txt 2018-08-20 11:02:28 +02:00
Nextcloud Hub.png add ViewerQuickLook 2023-01-12 12:39:54 +01:00
README.md build 10 2023-09-20 13:43:01 +02:00
Reasons to use Nextcloud.pdf new class 2022-12-28 13:16:21 +01:00
create-docker-test-server.sh Version 5.3.0 (#2930) 2024-05-25 09:06:05 +02:00
wait-for-server.sh Version 5.3.0 (#2930) 2024-05-25 09:06:05 +02:00
widget.png add image 2022-10-16 10:49:09 +02:00

README.md

Nextcloud iOS app

Releases Build SwiftLint irc

Demo of the Nextcloud iOS files appWidget of the Nextcloud iOS files app

Demo of the Nextcloud iOS files app

Check out https://nextcloud.com and follow us on twitter.com/nextclouders

How to contribute

If you want to contribute to Nextcloud, you are very welcome:

Contribution Guidelines & License

GPLv3 with Apple app store exception.

Nextcloud doesn't require a CLA (Contributor License Agreement). The copyright belongs to all the individual contributors. Therefore we recommend that every contributor adds following line to the header of a file, if they changed it substantially:

@copyright Copyright (c) <year>, <your name> (<your email address>)

Please read the Code of Conduct. This document offers some guidance to ensure Nextcloud participants can cooperate effectively in a positive and inspiring atmosphere, and to explain how together we can strengthen and support each other.

More information how to contribute: https://nextcloud.com/contribute/

Start contributing

You can start by forking this repository and creating pull requests on the develop branch. Maybe start working on starter issues.

Easy starting points are also reviewing pull requests

Xcode 15 Project Setup

Dependencies

After forking a repository you have to build the dependencies. Dependencies are managed with Carthage version 0.38.0 or later. Run

carthage update --use-xcframeworks --platform iOS

to fetch and compile the dependencies.

In order to build the project in Xcode you will also need a file GoogleService-Info.plist at the root of the repository which contains the Firebase configuration. For development work you can use a mock version found here.

Creating Pull requests

DCO Signoff

Nextcloud enforces the Developer Certificate of Origin (DCO) on Pull Requests. It requires your commit messages to contain a Signed-off-by line with an email address that matches your GitHub account.

How to Sign off

The DCO is a way for contributors to certify that they wrote or otherwise have the right to submit the code they are contributing by adding a Signed-off-by line to commit messages.

My Commit message

Signed-off-by: Random Contributor <random@contributor.dev>

Git even has a -s | --signoff command line option to append this to your commit messages automatically.

Support

If you need assistance or want to ask a question about the iOS app, you are welcome to ask for support in our Forums. If you have found a bug, feel free to open a new Issue on GitHub. Keep in mind, that this repository only manages the iOS app. If you find bugs or have problems with the server/backend, you should ask the Nextcloud server team for help!

TestFlight

Do you want to try the latest version in development of Nextcloud iOS ? Simple, follow this simple step

Apple TestFlight

Testing

Note: If a Unit or Integration test exclusively uses and tests NextcloudKit functions and components, then write that test in the NextcloudKit repo. NextcloudKit is used in many other repos as an API, and it's better if such tests are located there.

Unit tests:

There are currently no preresquites for unit testing that need to be done. Mock everything that's not needed.

Integration tests:

To run integration tests, we need a docker instance of a Nextcloud test server. The CI does all this automatically, but to do it manually:

  1. Run docker run --rm -d -p 8080:80 ghcr.io/juliushaertl/nextcloud-dev-php80:latest to spin up a docker container of the Nextcloud test server.
  2. Log in on the test server and generate an app password for device. There are a couple test accounts, but admin as username and password works best.
  3. Build the iOS project once. This will generate an .env-vars file in the root directory. It contains env vars that the project will use for testing.
  4. Provide proper values for the env vars inside the file. Here is an example:
export TEST_SERVER_URL=http://localhost:8080
export TEST_USER=nextcloud
export TEST_PASSWORD=FAeSR-6Jk7s-DzLny-CCQHL-f49BP
  1. Build the iOS project again. If all the values are set correctly you will see a generated file called EnvVars.generated.swift. It contains the env vars as Swift fields that can be easily used in code:
/**
This is generated from the .env-vars file in the root directory. If there is an environment variable here that is needed and not filled, please look into this file.
 */
 public struct EnvVars {
  static let testUser = "nextcloud"
  static let testPassword = "FAeSR-6Jk7s-DzLny-CCQHL-f49BP"
  static let testServerUrl = "http://localhost:8080"
}
  1. You can now run the integration tests. They will use the env vars to connect to the test server to do the testing.

UI tests

UI tests also use the docker server, but besides that there is nothing else you need to do.

Snapshot tests

Snapshot tests are made via this library: https://github.com/pointfreeco/swift-snapshot-testing and these 2 extensions:

  1. https://github.com/doordash-oss/swiftui-preview-snapshots - for creating SwiftUI snapshot tests via previews.
  2. https://github.com/alexey1312/SnapshotTestingHEIC - makes snapshot images HEIC instead of PNGs for much reduced size.

Snapshot tests are a great way to test if UI elements are consistent with designs and don't break with new commits, but they can be very finicky and the smallest change can cause them to fail. Keep in mind:

  • For SwiftUI snapshot tests, It's always a good idea to utilize previews, as they do not depend on device/app state and it has less chances to fail due to wrong state.

  • For UIKit snapshot tests, try to include mock dependencies to always make sure the UI is rendered the same way. Even a text change can cause the tests to fail.