Audiogum

Leverage the audiogum platform to create your own applications


License
BSD-1-Clause
Install
pod try Audiogum

Documentation

Platforms Languages Package Managers

The Audiogum iOS SDK

For an overview of the Audiogum platform, please see https://www.audiogum.com/developers

A client key and secret are required to use the SDK. Please get in contact to obtain these.

Documentation

The docs for the SDK are at https://www.audiogum.com/developers/docs/iossdk.html.

Installation

To build the project, install the dependencies using Carthage. Install Carthage if necessary, and then run the following from the root of your local copy of the repository:

carthage bootstrap --platform iOS
cd Samples & carthage bootstrap --platform iOS

After the dependencies are installed, you should be able to open and Audiogum.xcworkspace in Xcode The workspace contains three projects - Audiogum (the source code and tests), Remote Control (a Swift sample app), and Voice Control (a Swift sample app).

The Audiogum project contains Objective-C tests (in the AGMClientTests folder) and Swift tests (in the AudiogumTests folder) which demonstrate how to call of the methods from Objective-C or Swift and use their responses. Your client key and secret will need to be added to the TestConfig class (in AudiogumTests/utils) and to AGMConsts.m (in AGMTests), along with email address and password that will be used to create test users.

The SDK uses google promises for asynchronous responses from the Audiogum platform.

The Remote Control and Voice Control sample apps are more detailed examples of how to use the SDK with Swift. Your client key and secret will need to be added in the ApiConstants class in each project. The Remote Control app sends remote control commands to the Audiogum service, which can be used to control a connected device. See our Firmware Integration Guide for more information on how to add Audiogum services to your device firmware. The Voice Control app sends audio data from an embedded wav file to the Audiogum serivce, which returns remote control comands. See our Audiogum Voice APIs for more information.

Preview

A Sketch file featuring the UI elements used within the Remote Control app is included (in the Remote control directory) so you can modify your design. Audiogum vector logos are also included.

Getting Started

The Audiogum iOS SDK can be installed using CocoaPods or Carthage.

Add Audiogum to your own project using CocoaPods, add the following to your Podfile:

pod 'Audiogum'

Some of the dependencies are Swift, so if your project is Objective-C, you will need to enable modular headers:

pod 'Audiogum:modular_headers => true'

To add Audiogum to your own project using Carthage, add the following to your Cartfile:

github "audiogum/iossdk" 

Init an AudiogumClient with your client id and secret in Swift:

let client = AudiogumClient(clientId: "YOUR_CLIENT_ID",
        clientSecret: "YOUR_CLIENT_SECRET",
        deviceId: "YOUR_DEVICE_ID")

or in Objective-C:

AGMClient *deviceClient = deviceClient = [[AGMClient alloc] initWithClientId:YOUR_CLIENT_ID 
        clientSecret:YOUR_CLIENT_SECRET 
        deviceId:YOUR_DEVICE_ID];

The device will be authenticated, but many methods also require user authentication - so either create / login a user in Swift:

client.loginUser(email: email, password: password).then {
...
}

or in Objective-C:

[loginUserWithEmail:TEST_USERNAME withPassword:TEST_PASSWORD] then:^id(NSNull *null) {
...
}

Call methods on the AudiogumClient class (Swift) or the AGMClient (Objective-C).