# Setup

# Prerequisites

  • iOS 10.0+
  • Xcode 8.0+
  • Swift 3.3+

# Install

# Carthage

To install HyperRTC Call library via Carthage, insert following dependency in your cart file:

github "kavenegar/call-ios-sdk"

Then execute carthage update to download the dependencies.

After finishing the update you need to insert HyperRTC.framework file in your XCode project.

Note

Currently, HyperRTC SDK is available only by Carthage.

# Permissions

  • Enable Push Notification item

  • In the Background Modes section, enable Voice over IP and Audio, AirPlay and Picture in Picture options.

Xcode Project Capabilities

Note

In xcode 9 and higher, you need to change it in Info.plist file manually for adding background mode::

```xml
<key>UIBackgroundModes</key>
<array>
  <string>audio</string>
  <string>voip</string>
</array>
```

# Initialize SDK

At the beginning of the project, you need to initialize SDK before anything. To do so, we insert the following code to AppDelegate:

 func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
    KavenegarCall.initialize(environment: .production)
    return true
}