Skip to main content

Flutter for iOS

Installation Steps

See DeepAR SDK for iOS to create a project and generate your separate license key.

Once done, please add the latest deepar_flutter dependency to your pubspec.yaml.

1/ Ensure your app iOS deployment version is 13.0+.

2/ Download the DeepAR iOS binaries from our Downloads here.

3/ Copy the DeepAR.xcframework file from /lib folder of the downloaded file and paste as /ios/DeepAR.xcframework in the plugin's directory. Pub-cache folder can be found in the following directories, depending on your operating system:

  • Linux / Mac: ~/.pub-cache/hosted/<plugin-version>/android/libs/deepar.aar

  • Windows: %LOCALAPPDATA%\Pub\Cache\hosted\\deepar_flutter-<plugin-version>\android\libs\deepar.aar

4/ Do a Flutter clean & install pods again.

5/ To handle camera and microphone permissions, please add the following strings to your info.plist.


6/ Also add the following to your Podfile file:

post_install do |installer|
installer.pods_project.targets.each do |target|
... # Here are some configurations automatically generated by flutter

# Start of the deepar configuration
target.build_configurations.each do |config|

config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= [

## dart:

## dart: PermissionGroup.microphone

# End of the permission_handler configuration

Flutter Installation Steps

1/ Initialize DeepArController by passing in your license keys for both platforms.

<final  DeepArController _controller = DeepArController();
androidLicenseKey:"---android key---",
iosLicenseKey:"---iOS key---",
resolution: Resolution.high); />

2/ Place the DeepArPreview widget in your widget tree to display the preview.

Widget build(BuildContext context) {
return _controller.isInitialized
? DeepArPreview(_controller)
: const Center(
child: Text("Loading Preview")

3/ Load an effect of your choice by passing the asset file to it in switchPreview.


4/ To take a picture, use takeScreenshot() which return the picture as file.

final File file = await _controller.takeScreenshot();

5/ To record a video use the following:

if (_controller.isRecording) {
} else {
final File videoFile = _controller.startVideoRecording();