You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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"
Run carthage update to build the framework and drag the built NextcloudKit.framework into your Xcode project.
Swift Package Manager
Swift 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.
To add NextcloudKit to your app without Carthage, clone this repo and place it somewhere in your project folder.
Then, add NextcloudKit.xcodeproj to your project, select your app target and add the NextcloudKit framework as an embedded binary under General and as a target dependency under Build Phases.
Testing
Unit Tests
Since most functions in NextcloudKit involve a server call, you can mock the Alamofire session request. For that we use Mocker.
Integration Tests
To run integration tests, you need a docker instance of a Nextcloud test server. This is a good start.
In TestConstants.swift you must specify your instance credentials. The app token is automatically generated.
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:
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.