Adding SDK to your application using Cocoapods
Install the CocoaPods (see getting starting guide).
Follow the instructions to create or modify Podfile.
Add VoxImplantSDK dependency to your target in Podfile:
platform :ios, '9.0' use_frameworks! target 'MyApp' do // other dependencies and configurations pod 'VoxImplantSDK' end
Run "pod install" command in the terminal from your project directory.
Open the *.xcworkspace file that was created. This should be the file you use every day to create your app.
You can see the example of Podfile in our demo repository.
You can also use bitcode assemblies in your builds. Despite having this option, the usage of bitcode libraries is not recommended for debug/testing builds because of its size. The VoxImplantWebRTC bitcode assembly is unoptimized and around 700 Mb. Due to the size, it allows Apple services to pick only the required components and methods from it. See the details here.
Adding SDK to your application using Swift Package Manager
Voximplant iOS SDK is distributed as a binary package (XCFramework) since 2.38.0.
- iphoneos: armv7, arm64
- iphonesimulator: i386, x86_64, arm64
Add Voximplant to your app in Xcode
- Open your project in Xcode
- Go to Files > Swift Packages > Add Package Dependency
- Add the Voximplant iOS SDK Swift PM github repository there
- Select the SDK version
More information can be found in the Apple Developer documentation.
Add Voximplant to your package
To add Voximplant iOS SDK as a dependency of your package, declare it in the
dependencies section of your
dependencies: [ .package(url: "https://github.com/voximplant/ios-sdk-releases.git", .upToNextMinor(from: "2.38.0")) ]
Voximplant iOS SDK version does not fully conform to semantic versioning.
Backward compatibility is only guaranteed for the patch version. API changes or a dependency update will increment the minor version.
Check the Voximplant iOS SDK changelog before selecting a version requirement. It is recommended to use the
Include the NSMicrophoneUsageDescription and NSCameraUsageDescription keys in your app's Info.plist file and provide reasonable strings for these keys. If your app attempts to access any of the device’s microphones or cameras without corresponding reasonable strings, your app exits.
You also have to declare four Background Modes:
- Audio and AirPlay
- Background fetch
- Remote notifications
- Voice over IP
Enabling the Background Modes option adds the UIBackgroundModes key to your app’s Info.plist file. Selecting checkboxes in Xcode adds the corresponding background mode values to that key.
Then create a VIClient instance and initialize it as specified in the documentation:
Connect and Log In
Firstly, you need to connect to the Voximplant cloud. As a result, the clientSessionDidConnect: or client:sessionDidFailConnectWithError: event will be sent to VIClientSessionDelegate. After the connection is established, use the loginWithUser:password:success:failure: function to authenticate. For example, when you need to login user myuser to application myapp in your Voximplant account named myaccount with password mypass: