Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
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.
24 changes: 11 additions & 13 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,16 +38,16 @@ 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, you need a docker instance of a Nextcloud test server. [This](https://github.com/szaimen/nextcloud-easy-test) is a good start.

1. In `TestConstants.swift` you must specify your instance credentials. App Token is automatically generated.
1. In `TestConstants.swift` you must specify your instance credentials. The app token is automatically generated.

```
```swift
public class TestConstants {
static let timeoutLong: Double = 400
static let server = "http://localhost:8080"
Expand Down
4 changes: 2 additions & 2 deletions REUSE.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ SPDX-PackageSupplier = "2024 Nextcloud GmbH and Nextcloud contributors"
SPDX-PackageDownloadLocation = "https://github.com/nextcloud/NextcloudKit"

[[annotations]]
path = ["image.png", "NextcloudKit.png", "NextcloudKit.svg"]
path = ["NextcloudKit.png", "NextcloudKit.pxd", "NextcloudKit.svg"]
precedence = "aggregate"
SPDX-FileCopyrightText = "2023 Nextcloud GmbH"
SPDX-FileCopyrightText = "2024 Nextcloud GmbH"
SPDX-License-Identifier = "LicenseRef-NextcloudTrademarks"

[[annotations]]
Expand Down
Binary file removed image.png
Binary file not shown.
Loading