Skip to content

Use on-device image generation based on dynamic templates with the official Placid SDK for iOS


Notifications You must be signed in to change notification settings


Folders and files

Last commit message
Last commit date

Latest commit



14 Commits

Repository files navigation iOS SDK

Placid iOS SDK

Generate custom share images on-device

Placid is a toolkit for creative automation. It lets you generate images with dynamic content from custom templates - e.g. for personalized share visuals. The Placid iOS SDK offers native, on-device image generation for your apps.

  • Offline, on-device image generation
  • Custom templates for on-brand visuals
  • Drag & drop template editor
  • Dynamic content layers
  • Auto-resizing for text and images
  • Unlimited generated images
  • Dynamic in-app previews

➡️ Learn more about the Placid Mobile SDK

⚙️ Requirements

  • iOS 13.0

📦️ Installation

Swift Package Manager

To integrate the Placid SDK into your Xcode project using Swift Package Manager, specify it in the dependencies of your Package.swift:

// swift-tools-version:5.3
import PackageDescription
dependencies: [
    .package(url: "", .upToNextMajor(from: "1.0.1"))

⚠️ The SDK has dependencies on binary frameworks, so you have to use a version higher than 5.3 of your Swift Tools


To integrate Placid into your Xcode project using CocoaPods, specify it in your Podfile:

pod 'Placid'


To integrate Placid into your Xcode project using Carthage, specify it in your Cartfile:

binary ""


If you prefer to integrate Placid manually instead of using a Dependency Manager, download the latest Placid.xcframwork and add it to your project.

✨ Usage

Setup on

  1. Register on (✅ free trial)
  2. Create a project and add the Placid mobile integration
  3. Add a template
  4. Add a mobile license in your project settings
  5. Download your template(s) to use with the SDK


Configure the Placid SDK in your AppDelegate by providing the URL to your mobile templates package downloaded from the Placid web app.

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
    do {
	try PlacidSDK.configure(withLicenseKey: "your-placid-license-key", templateURL: Bundle.main.url(forResource: "templates", withExtension: "placid"))
    } catch {

Retrieve Templates

Templates can be retrieved via their unique identifier (as found in the Placid web app). If the template is not found, this method will return nil.

let template = PlacidSDK.template(withIdentifier: "template-identifier")

Preload Templates

For faster rendering it is recommended to preload a template as soon as it is accessed.


Modify Layer Data

You can modify the content and appearance of dynamic layers in your template.

⚠️ Use the layer names as specified in the template editor, otherwise the layer will be ignored.


let textLayer = template.textLayer(named: "title")
textLayer.text = "A new title"
textLayer.textColor =


let image = UIImage(named: "avatar")!
let pictureLayer = template.pictureLayer(named: "avatar")
pictureLayer.image = image


let rectangleLayer = template.rectangleLayer(named: "rect")
rectangleLayer.backgroundColor =
rectangleLayer.borderColor =

Browser Frames

let browserFrameLayer = template.browserFrameLayer(named: "browser")
browserFrameLayer.url = browserURL

General Properties

These properties are supported by all layer types.

let layer = template.textLayer(named: "title")
layer.isHidden = false
layer.origin = .zero
layer.size = CGSize(width: 100, height: 50)

The mobile SDK supports the same layers and properties as the Placid REST API, so have a look for the full set of supported functions and properties.

Render Images

Once all data is added to the template, it can be rendered to a native image. Use the rendered image in your UIImageView or Image for dynamic in-app previews or pass it along for social sharing.

template.renderImage(completion: { [weak self] image in
	// use the image here

Or via async function:

let image = await template.renderImage()

💬 Support

For bug reports, please create a new Issue right here on Github. Otherwise have a look at our Help section.