Getting Started with iOS SDK

Important:
iOS Simulator can not be used for audio in real time. You must connect an iPhone for testing.

Add SDK to your project

First thing you have to do is add the main frameworks needed to use Voicemod:

  • Voicemod.framework
  • Ogg.framework
  • Vorbis.framework

Just drag and drop from the root of the VoicemodSDK folder to your project within Xcode.

Voicemod needs also some other frameworks inside your project

  • CoreMedia
  • AudioToolbox
  • AVFoundation
  • libstdc++.6.0.9

Just add each of them by going to your main project -> Build Phases -> Link Binary With Libraries and click + for each framework.

Add VoiceData folder to your project

In order to use background sounds you need to add the "VoiceData" folder to your project using "Create folder references" option in order to ensure that in the compiled app the sounds will be in the main bundle inside a VoiceData folder

addsoundsfolder

Additions to your Info.plist file

The are two additions to your actual Info.plist file, a microphone access permission and network access to voicemod.net in order to check your license status.

In order to use microphone you need to add NSMicrophoneUsageDescription ("Privacy - Microphone Usage Description" in natural words) string key to your Info.plist file, the value of the key will be showed in alert view asking to the user.

You also need to add network access to voicemod.net using these two options:

  • Option 1: Add NSAppTransportSecurity ("App Transport Security Settings") key inside your Info.plist file, and add NSAllowsArbitraryLoads ("Allow Arbitrary Loads") boolean key set to YES.

infoplist2

  • Option 2: Add NSExceptionDomains ("Exception Domains") key a dictionary with the key "voicemod.net" and booleans values set to YES to keys NSIncludesSubdomains and NSExceptionAllowsInsecureHTTPLoads

infoplist

Initialize the SDK

You need to import VoicemodSDK.h file and add the call to startWithClientKey: method, with your own Client key, inside application:didFinishLaunchingWithOptions: in your main App delegate:

Once the SDK are initialized you can use this two ways to access sharedInstance of the singleton

or