Installation - Bandyer/Bandyer-iOS-SDK GitHub Wiki

The following guide will help you installing the Kaleyra Video iOS SDK in your app. Several installation methods are supported. Cocoapods is the most straightforward way to add the SDK to your project.

Table of contents:

Swift package manager

Starting from 3.7.0 version the SDK supports Swift package manager. In order to add the package to your app, select add package in Xcode and use this repository URL from the Xcode user interface

Cocoapods

CocoaPods is a dependency manager for Cocoa projects. You can install it with the following command:

$ gem install cocoapods

If you're new to CocoaPods, the website contains lots of helpful documentation.

BandyerSDK 3.x

To integrate the latest SDK version into your Xcode project using Cocoapods, specify it in your Podfile:

platform :ios, '10.0'
use_frameworks!

target '<YOUR_TARGET_NAME>' do
    pod 'Bandyer', ~> '3.1.0'
end

Replace '<YOUR_TARGET_NAME>' with the name of your App target and then, in the Podfile directory, run the following command:

$ pod install --repo-update

Standalone framework

Starting from version 3.10.2 we are allowing the installation of the Kaleyra Video framework as a standalone framework without the WebRTC framework when using Cocoapods. You are supposed to use this framework only if your app happens to have another framework providing the WebRTC framework in order to avoid conflicts

[!CAUTION] Beware, the WebRTC framework is still needed in order to compile and run the application. Moreover, you are responsible for using a compatible WebRTC module. WebRTC versions starting from M100 and above should be supported.

To integrate the standalone SDK version into your Xcode project using Cocoapods, specify it in your Podfile:

platform :ios, '10.0'
use_frameworks!

target '<YOUR_TARGET_NAME>' do
    pod 'Bandyer/Core', ~> '3.10.2'
end

Replace '<YOUR_TARGET_NAME>' with the name of your App target and then, in the Podfile directory, run the following command:

$ pod install --repo-update

BandyerSDK 2.x

To integrate an older SDK version into your Xcode project using CocoaPods, specify it in your Podfile:

platform :ios, '10.0'
use_frameworks!

target '<YOUR_TARGET_NAME>' do
    pod 'Bandyer', '2.10.0'
end

Replace '<YOUR_TARGET_NAME>' with the name of your App target and then, in the Podfile directory, run the following command:

$ pod install --repo-update

Carthage

The Kaleyra Video iOS SDK supports installation through Carthage dependency manager. If you are new to Carthage we strongly suggest you to take a look at its documentation before continuing reading this chapter. In order to add the Kaleyra Video SDK to your app using Carthage, you must update your Cartfile adding the following directive replacing "version" with the actual version you are interested in:

github "bandyer/bandyer-ios-sdk" ~> version

Then, once the Cartfile has been updated, you must tell carthage to checkout the Bandyer framework from terminal:

# Move to your project root directory, where the Cartfile is located, then run the following command:
$ carthage update --use-xcframeworks --platform iOS

If you see the following message: "Dependency "bandyer-ios-sdk" has no shared framework schemes for any of the platforms: iOS" when carthage has finished updating don't worry, it's not an issue.

As with all frameworks included with Carthage, you must manually update your project configuration. These steps however are required for any dynamic framework and are explained in detail in Carthage documentation, so we are not going to bothering you with a step by step guide.

Manual Installation for XCFramework

Coming soon...

Manual Installation for FAT framework

  1. Clone or download the SDK

  2. Then drag and drop the following frameworks into you XCode project

    • Bandyer.framework
    • WebRTC.framework
  3. Then drag and drop the following projects into your XCode project:

    • Socket.IO-Client-Swift (3.5.0 version and below)
    • Starscream (3.5.0 version and below)
  4. In your project's build configuration (Go to your project's settings and find the "Build Phases" tab, then in the "Target Dependencies" section) add the following frameworks:

    • Socket.IO-Client-Swift (3.5.0 version and below)
    • Starscream (3.5.0 version and below)
  5. Then find the "General" tab and under the "Embedded Binaries" section add:

    • Bandyer.framework
    • WebRTC.framework
    • Socket.IO-Client-Swift (3.5.0 version and below)
    • Starscream (3.5.0 version and below)
  6. In the "Linked Frameworks and libraries" section add:

    • Foundation.framework
    • UIKit.framework
    • AVFoundation.framework
    • SystemConfiguration.framework
    • MobileCoreServices.framework
    • WebKit.framework
    • MediaPlayer.framework
    • CoreGraphics.framework
    • CoreMedia.framework
    • CoreImage.framework
    • CoreServices.framework
    • Photos.framework
    • Security.framework
    • CallKit.framework
    • Intents.framework
    • PushKit.framework
    • ReplayKit.framework
  7. In the "Build Settings" tab, if your app doesn't contain any swift code, set Always Embed Swift Standard Libraries to YES.

  8. Last thing, Bandyer.framework, WebRTC.framework are Fat frameworks and they contain x86 and x64 slices that must be removed before submitting your app to the App Store, otherwise your binary won't pass through the AppStore validation checks, and your binary will be rejected. For an example of how to remove unsupported architecture see https://dzone.com/articles/creating-a-universal-framework-in-xcode-9