Coviu iOS SDK on Cocoapods
Coviu iOS SDK enables your iOS app with Coviu capability in 5 minutes.
Note that Coviu iOS SDK is compatible with iPhone and iPad. This is because Coviu iOS SDK needs Camera and Mic support on real devices.
This guide shows how to enable Coviu service on your iOS app. Coviu iOS SDK uses CocoaPods to install and manage dependencies. Open a terminal window and navigate to the location of the Xcode project for your application. Or you can checkout this sample application
If you have not already created a Podfile in your application, please create one by followings:
- pod init
Open the podfile that you just created and add the followings:
- pod 'CoviuSDKiOS'
Save it and run:
- pod install
Now you can open the .xcworkspace file in Xcode.
Step 1: Create a Coviu view in your app
Here you will add Coviu in your application. Coviu iOS SDK appends a Coviu subview in the parent view of your app. Assuming the file viewController.m in your application contains a UIView where the Coviu subview will be placed, do the following:
- open the viewController.m and add the header
- Declare a CoviuSDKiOS object in the header
- Find the method viewDidLoad and add the Coviu view
_coviu = [CoviuSDKiOS new]; [_coviu addCoviuView:self.view withURL:@https://coviu.com];
_coviu = [[CoviuSDKiOS alloc] initView:self.view withURL:@"https://www.coviu.com"];
Step 2: Configure Build Settings
Coviu iOS SDK is supported in iOS 9.1 or higher. Please make sure the deployment target is newer than it.
To access the camera, microphone, and Bluetooth devices, the values of NSCameraUsageDescription, NSMicrophoneUsageDescription and NSBluetoothPeripheralUsageDescription in the info.plist file must be set. These description will inform users why your app needs these devices.
<key>NSMicrophoneUsageDescription</key> <string>Microphone is needed for COVIU calls.</string> <key>NSBluetoothPeripheralUsageDescription</key> <string>Bluetooth adaptor is needed if a bluetooth device presents.</string> <key>NSCameraUsageDescription</key> <string>Camera is needed for COVIU calls.</string>