Skip to main content

iOS Getting Started

Requirements#

  • Latest stable Xcode

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.

Get the Banuba SDK archive#

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

  • Banuba Effect Player XCFramework (BanubaEffectPlayer.xcframework),
  • 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 the sdk_repacking.py script provided with the SDK archive.

Please refer to SDK repacking readme in your SDK archive or our video guide for more information and usage example.

Build your project with the Banuba SDK#

  1. By default Xcode provide arm64, armv7 architectures as default. Since Banuba SDK supports only arm64, x86_64 you should change you valid architectures and add arm64 as excluded for Any iOS Simulator SDK in order to run Banuba SDK on simulators.

image

  1. In your project create New Group with name Frameworks. Then, open this folder in Finder and copy the following files from your SDK archive:
  • BNBEffectPlayer/bin/BanubaEffectPlayer.xcframework.
  • BNBEffectPlayer/src/BanubaSdk/BanubaSdk/BanubaSdk/.
  • BNBEffectPlayer/src/BanubaSdk/BanubaSdk/BanubaSdk.xcodeproj.

image

  1. Drag BanubaEffectPlayer.xcframework and BanubaSdk.xcodeproj from Frameworks folder in Finder to your Xcode project.

image

  1. In General of your project add BanubaSdk.framework and BanubaEffectPlayer.xcframework to Frameworks, Libraries, and Embedded Content. Here this frameworks should be marked as Embed & Sign.

image

  1. In General of BanubaSdk.xcodeproj replace BanubaEffectPlayer.framework with BanubaEffectPlayer.xcframework and mark it as Do Not Embed.

image

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

image

  1. Make sure that you have correct Framework Search Path to Frameworks folder in your project and BanubaSdk.xcodeproj.

image

  1. Now you can run your project with the Banuba SDK on your device or simulator.
Last updated on