The iOS version of AromaShooterController SDK which is used to communicate with Aroma Shooter devices.
- Aroma Shooter Bluetooth version
- iOS version: >= 8.0
- Swift version: >= 3.0
- Download the framework file at the release page.
- Drag and drop it into your project. (Make sure that it is added in Embedded Binaries section in your project's target page).
- Import Controller module
import AromaShooterControlerSwift
- Get the Controller class reference
var controller = AromaShooterController.sharedInstance
We have done the connection UI part for you. You can easily open the connection view controller by one of two ways.
if you are using NavigationController
, please use these codes.
let connectionVC = controller.getConnectionViewController()
if let connectionVC = connectionVC {
self.navigationController?.pushViewController(connectionVC, animated: true)
}
In other cases, you can use the below codes.
let connectionVC = controller.getConnectionViewController()
if let connectionVC = connectionVC {
self.present(connectionVC, animated: true, completion: nil)
}
let connectedDevices = controller.connectedDevices
- Diffuse scents of all connected devices
controller.diffuseAll(duration: 3000, booster: true, ports: [1, 2, 3])
- Diffuse scents of specific devices
controller.diffuse(aromaShooters: devices, duration: 3000, booster: true, port: [1, 2, 3])
Stop all ports of current connected devices if they have been diffusing
controller.stopAll();
For more information, please checkout this repository and refer to the sample project.
If you get any issues or require any new features, please create a new issue.
Copyright (c) 2017 Aromajoin Corporation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.