Banuba SDK iOS
Banuba SDK delivery includes the following parts: BanubaSdk.framework
and BanubaEffectPlayer.xcframework
.
BanubaEffectPlayer.xcframework
provides a relativly low-level cross-platform API which is described in the API reference.
BanubaSdk.framework
is build on the top of BanubaEffectPlayer.xcframework
and provides the iOS-specific functionality.
BanubaEffectPlayer.xcframework
provided in the compiled
form and BanubaSdk.framework
in sources are available for your reference and fine-tuning.
The entry point to BanubaSdk.framework
is BanubaSdkManager
class. This class provides the following functionality:
- Rendering layer configuration --
setRenderTarget
(RenderTarget
on the diagramm). - Start/stop Effect Player --
startEffectPlayer
,stopEffectPlayer
. - Continuous photo rendering (i.e. the dynamic effect applied to the frozen image) --
startEditingImage
,captureEditedImage
,stopEditingImage
. - Take a photo with the camera and apply the current effect --
makeCameraPhoto
. - Apply the effect to an in-memory photo (e.g. images created from files) --
processImageData
. - Apply the watermark while rendering --
configureWatermark
,removeWatermark
. - Apply the effect to the sequence of frames in memory (e.g. video file) --
startVideoProcessing
,stopVideoProcessing
,processVideoFrame
. - Push a frame from the camera --
push
. - Take snapshots --
output?.takeSnapshot
. - Record a screen video with effects applied --
outputService.startVideoCapturing
,outputService.stopVideoCapturing
(OutputService
andSBVideoWriter
on the diagramm). - Send frames to other destinations (e.g. via WebRTC) --
outoutService.startForwardingFrames
,outputService.stopForwardingFrames
. - Camera and audio input control --
input
(instanse ofInputService
, see the diagramm). - Capturing the frames rendered (in binary form, used for debugging) --
setFrameDataRecord
. - Voice Changer (change user's voice in videos) --
voiceChanger
.
The Effect component makes up an essential part of the SDK usage. The effect is represented as a folder with scripts and resources. Please, refer to the iOS demo app section for more details about effects.
#
Configuring watermarkIf you wan't to apply watermark to your photos, you should use output?.takeSnapshot
method instead of makeCameraPhoto
. Watermark can be used only with snapshots made with takeSnapshot
.
#
Configuring AVAudioSessionIn Banuba SDK, the AVAudioSession is set to category .ambient
by default. You can change it to another category using the InputService.swift
file, the startCamera()
method.
You can modify AVAudioSession mode and the options that will be appropriate for your app’s behaviour using the configureAudioSessionWithCategory
method.
#
Reject from Apple Connectnote
Apple may reject your app if it uses TrueDepth APIs, but doesn't include all of the information in its privacy policy required by Guideline 5.1.1 of the App Store Review Guidelines and Section 3.3.10 of the Apple Developer Program License Agreement.
Banuba SDK uses ARKit
, therefore, to avoid your app rejection, please check our privacy policy where we describe the usage of ARKit and TrueDepth API.
Still have any questions about FaceAR SDK for iOS?
Visit our FAQ or contact our support.