Skip to content

Commit

Permalink
Prettier Landing Page
Browse files Browse the repository at this point in the history
- Replaced logo with an self-created image based on the Apple symbol design for frameworks.
- Removed the "V 2" in the top level heading because it contradicts the current major version 5.
- Corrected alt text of image which appears to be copied and pasted from Nextcloud iOS app README.
- Improved orthography on testing headings.
- Added syntax definitions to some code fences.
- Minor formatting improvements.
  • Loading branch information
i2h3 committed Nov 25, 2024
1 parent 5ddf89c commit ef2a17a
Show file tree
Hide file tree
Showing 5 changed files with 52 additions and 28 deletions.
Binary file modified NextcloudKit.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added NextcloudKit.pxd
Binary file not shown.
48 changes: 36 additions & 12 deletions NextcloudKit.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
32 changes: 16 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@
- SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors
- SPDX-License-Identifier: GPL-3.0-or-later
-->
# NextcloudKit V 2
<img src="image.png" alt="Demo of the Nextcloud iOS files app" width="200" height="200">

[![REUSE status](https://api.reuse.software/badge/github.com/nextcloud/NextcloudKit)](https://api.reuse.software/info/github.com/nextcloud/NextcloudKit)
<div align="center">
<img src="NextcloudKit.png" alt="Logo of NextcloudKit" width="256" height="256" />
<h1>NextcloudKit</h1>
<img src="https://api.reuse.software/badge/github.com/nextcloud/NextcloudKit" alt="REUSE status" />
</div>

## Installation

### Carthage

[Carthage](https://github.com/Carthage/Carthage) is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks.

To integrate **NextcloudKit** into your Xcode project using Carthage, specify it in your `Cartfile`:
[Carthage](https://github.com/Carthage/Carthage) is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks. To integrate **NextcloudKit** into your Xcode project using Carthage, specify it in your `Cartfile`:

```
github "nextcloud/NextcloudKit" "main"
Expand All @@ -23,9 +23,7 @@ Run `carthage update` to build the framework and drag the built `NextcloudKit.fr

### Swift Package Manager

[Swift Package Manager](https://swift.org/package-manager/) is a tool for automating the distribution of Swift code and is integrated into the `swift` compiler.

Once you have your Swift package set up, adding NextcloudKit as a dependency is as easy as adding it to the `dependencies` value of your `Package.swift`.
[Swift Package Manager](https://swift.org/package-manager/) is a tool for automating the distribution of Swift code and is integrated into the `swift` compiler. Once you have your Swift package set up, adding NextcloudKit as a dependency is as easy as adding it to the `dependencies` value of your `Package.swift`.

```swift
dependencies: [
Expand All @@ -40,24 +38,26 @@ Then, add `NextcloudKit.xcodeproj` to your project, select your app target and a

## Testing

### Unit tests:
### Unit Tests

Since most functions in NextcloudKit involve a server call, you can mock the Alamofire session request. For that we use [Mocker](https://github.com/WeTransfer/Mocker).

### Integration tests:
### 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. Run `./generate-env-vars.sh`. 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
```sh
export TEST_SERVER_URL="http://localhost:8080"
export TEST_USER="nextcloud"
export TEST_PASSWORD="FAeSR-6Jk7s-DzLny-CCQHL-f49BP"
```
5. Run `./generate-env-vars.sh` again to regenerate the env vars. 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:
```
```swift
/**
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.
*/
Expand Down
Binary file removed image.png
Binary file not shown.

0 comments on commit ef2a17a

Please sign in to comment.