An open API service indexing awesome lists of open source software.

https://github.com/kouprlabs/voltaserve-ios

📱 Voltaserve iOS App
https://github.com/kouprlabs/voltaserve-ios

app ios ipad iphone mac swift swift-ui voltaserve

Last synced: 2 months ago
JSON representation

📱 Voltaserve iOS App

Awesome Lists containing this project

README

        

# Voltaserve iOS

Optimized for iPhone and iPad, runs great on the Mac.

Watch the [demo video](https://youtu.be/RpHp0OEa_o8?feature=shared).

## Usage

- Make sure your Voltaserve instance is up and running, or follow the instructions [here](https://github.com/kouprlabs/voltaserve) to create a new instance.
- Install the app on your device with Xcode.
- On the sign in screen, in the upper right corner, click the cog button to create a new server that points to the URLs of your instance, **then activate it**, example URLs:
- API: `http://localhost:8080`
- Identity Provider: `http://localhost:8081`
- Sign in and enjoy!

## Getting Started

Prerequisites:

- Install [Xcode](https://developer.apple.com/xcode/).
- Install [SwiftLint](https://github.com/realm/SwiftLint).

This is a Swift package, it can be installed using the [Swift Package Manager](https://www.swift.org/documentation/package-manager/) and imported in your code.

The clients in [Sources/Clients](./Sources/Clients) can be used to communicate with Voltaserve APIs.

The extensible `Voltaserve` SwiftUI view can be used to embed the entire UI in your apps:

```swift
import SwiftUI
import VoltaserveCore

@main
struct MyApp: App {
var body: some Scene {
WindowGroup {
Voltaserve()
}
}
}
```

Format code:

```shell
swift format -i -r .
```

Lint code:

```shell
swift format lint -r .
```

```shell
swiftlint lint --strict .
```

## Tests

The test suite expects the following accounts to exist:

| Email | Password |
| ---------------- | ----------- |
| [email protected] | `Passw0rd!` |
| [email protected] | `Passw0rd!` |

Build and run with Docker:

```shell
docker build -t voltaserve/ios-tests . && docker run --rm \
-e API_HOST=host.docker.internal \
-e IDP_HOST=host.docker.internal \
-e USERNAME='[email protected]' \
-e PASSWORD='Passw0rd!' \
-e OTHER_USERNAME='[email protected]' \
-e OTHER_PASSWORD='Passw0rd!' \
voltaserve/ios-tests
```

In Linux you should replace `host.docker.internal` with the host IP address, it can be found as follows:

```shell
ip route | grep default | awk '{print $3}'
```

## Licensing

Voltaserve is released under the [Business Source License 1.1](LICENSE).