<commit_before># ![KubiServer](KubiTest/Assets.xcassets/AppIcon.appiconset/icon-AppStore@2x.png)

# Kubi Server
Control your Kubi

This repository contains the source code for Kubi Server iOS app.

This app consists in the following main components:

 * Exposing a Kubi control API on local iOS device network.
 * Exposing video live streaming.

## Installation

- Fork or download project.
- Open Xcode.
- Add Kubi framework to your project. You can download it [here](https://cdn.kubi.me/?prefix=Files/sdk-ios/).
- From Terminal, use `pod install` to install [HaishinKit](https://github.com/shogo4405/lf.swift) and [GCDWebServer](https://github.com/swisspol/GCDWebServer) pods.
- Add this code to NetStream.swift :
 ```swift
 open func attachCameraWithoutStart(_ camera: AVCaptureDevice?) {
		DispatchQueue.main.async {
           self.mixer.videoIO.attachCamera(camera)
        }
    }
```
         
- Compile on your device. Kubi framework has not been compiled for simulator so you will not be able to install KubiServer app on it.

## Installation Requirements

- Xcode
- Cocoapods installed

## User Steps after installation

- Open the app (control API will automatically be deployed)
- Connect using Bluetooth to the Kubi using the 'Scan' button. You can check Kubi connectivity using control buttons
- Tap 'Stream camera' button to deploy streaming API
- Use control & streaming URLs added

The control server should be running even if the app is in background.

## Contributing

Everything works around one branch (`master`) to follow the [Github Flow](https://guides.github.com/introduction/flow/). 

Feel free to submit pull requests.
**Test your code** and existing (not yet tested) code if possible before pull requests.

## Pods used
 * [HaishinKit (formely lf)](https://github.com/shogo4405/lf.swift)
 * [GCDWebServer](https://github.com/swisspol/GCDWebServer)

## Authors
 * <NAME>

## License
 * KubiServer is released under a BSD License. See LICENSE file for details.

## Related project
* [Accessors](http://accessors.org)

## See also
 * [Kubi](https://www.revolverobotics.com/)


<commit_msg>Improve README<commit_after><p align="center">
  <img src="https://cloud.githubusercontent.com/assets/4340716/22605826/6cb27cfe-ea06-11e6-803c-f069feb71760.png" alt="Kubi Server App" height="200" width="200"/>
</p>
# Kubi Server App [![GitHub license](https://img.shields.io/badge/license-New%20BSD-blue.svg)](https://raw.githubusercontent.com/V1C0D3R/KubiServerApp/master/LICENCE.txt)
![platform](https://img.shields.io/badge/platform-ios-lightgrey.svg)

Control your Kubi on your local network with a iOS gateway.

This repository contains the source code for Kubi Server iOS app.

This app consists in:

 * Exposing a Kubi control API on local iOS device network.
 * Exposing a video live streaming endpoint.

## Installation Requirements

- Xcode
- Cocoapods

> *Kubi framework has not been compiled for simulator so you will not be able to install KubiServer app on it.*

## Installation

1. Fork or download project.
- Open Xcode.
- Add Kubi framework to your project. You can download it [here](https://cdn.kubi.me/?prefix=Files/sdk-ios/).
- From Terminal, use `pod install` to install [HaishinKit](https://github.com/shogo4405/lf.swift) and [GCDWebServer](https://github.com/swisspol/GCDWebServer) pods.
- Add this code to NetStream.swift :
 ```swift
 open func attachCameraWithoutStart(_ camera: AVCaptureDevice?) {
 		DispatchQueue.main.async {
 			self.mixer.videoIO.attachCamera(camera)
		}
}
```
         
6. Compile on your device.


## User Steps after installation

- Open the app (control API will automatically be deployed)
- Connect using Bluetooth to the Kubi using the 'Scan' button. You can check Kubi connectivity using control buttons
- Tap 'Stream camera' button to deploy streaming API
- Use control & streaming URLs added

The control server should be running even if the app is in background but the video stream server will pause. See why [here](https://github.com/shogo4405/lf.swift).

## Contributing

Everything works around one branch (`master`) to follow the [Github Flow](https://guides.github.com/introduction/flow/). 

Feel free to submit pull requests.
**Test your code** and existing (not yet tested) code if possible before pull requests.

## Pods used
 * [HaishinKit (formely lf)](https://github.com/shogo4405/lf.swift)
 * [GCDWebServer](https://github.com/swisspol/GCDWebServer)

## Authors
 * <NAME> - victor (dot) nouvellet (at) gmail (dot) com

## License
 * KubiServer is released under a New BSD License. See LICENSE file for details.

## See also
* [Accessors](http://accessors.org)
* [Kubi](https://www.revolverobotics.com/)


{'fraction_non_alphanumeric': 0.10765295246216158, 'fraction_numerical': 0.014495843103815818, 'mean_word_length': 4.2191323692992215, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 9, 'https://': 19, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 1, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5023751', 'n_tokens_mistral': 1529, 'n_tokens_neox': 1415, 'n_words': 490}