iOS Getting Started

Requirements

  • Latest stable xCode

Simulator support

note

Read this before uploading your app to the store.

BanubaEffectPlayer.framework is a fat binary (arm64 + x86_64) to support simulators. You may get an issue when uploading to the App Store:

App Store Connect Operation Error
ERROR ITMS-90087: “Unsupported Architectures. The executable for XXX.app/Frameworks/BanubaEffectPlayer.framework contains unsupported architectures ‘[x86_64]’.”

Just strip x86_64 version of the library from your application: https://stackoverflow.com/questions/30547283/submit-to-app-store-issues-unsupported-architecture-x86

Get the client token and configuration file

To start working with the Banuba SDK in your project, you need to have the client token. To receive the client token please fill in our form on banuba.com website, or contact us via info@banuba.com.

Together with the token, you will receive a configuration file config.json which contains the required SDK resources defined by the token. Read more about this in Repack your SDK archive (minify SDK size) section.

note

Before building your project, place your client token inside the file: BanubaClientToken.swift.

Client token usage example

BanubaClientToken.swift
internal let banubaClientToken = "YOUR_TOKEN_HERE"

Get the Banuba SDK archive

With the client token, you will also receive the Banuba SDK archive for iOS which contains:

  • Banuba Effect Player Framework (BanubaEffectPlayer.framework),
  • BanubaSdk xCode project,
  • Effect examples located under effects folder.

Repack your SDK archive (minify SDK size)

SDK release archive contains all SDK resources by default. They may consume more disk space in the ready build.

To reduce the SDK size please use sdk_repacking.py script provided with the SDK archive.

Please refer to SDK repacking readme in your SDK archive for more info and usage example.

Build your project with Banuba SDK

  1. Create Frameworks folder in your project's folder and add copy the following files from your SDK archive:
  • BNBEffectPlayer/bin/BanubaEffectPlayer.framework - pre-built Banuba SDK framework,
  • BNBEffectPlayer/src/BanubaSdk/BanubaSdk - xCode project that will make BanubaSdk platform module.
  1. Drag BanubaEffectPlayer.framework from Frameworks to your project folder and click Finish.

image

  1. Choose your project and with the right mouse click select Add files to your project.
  1. From Frameworks folder created in step 1, select BanubaSdk → BanubaSdk.xcodeproj and Add.

image

  1. In Build Phases of your project add BanubaSdk as a dependencie.

image

  1. Both for your project and BanubaSdk.xcodeproj in Build Settings add paths to Frameworks folder.

image

  1. For BanubaSdk.xcodeproj in Frameworks and Libraries add BanubaEffectPlayer.framework and make it as Do Not Embed

image

  1. For your project in Frameworks and Libraries add BanubaEffectPlayer.framework with BanubaSdk and make them as Embed & Sign

image

  1. Now you can run your project with BanubaSdk on your device
Last updated on