Skip to main content
This page matches SDK 2.0.0. Auth: Auth & License. Makeup / reshape enums: Parameter enums.

Environment Requirements

  • macOS Version: macOS 10.15 and above
  • Development Language: Objective-C (AppKit / NSImage)
  • Architecture Support: x86_64, arm64 (Apple Silicon)

Get Sample Source Code

Clone the GitHub repository locally, and navigate to the demo/macos directory.
Xcode 15+ compilation errorIf you are using Xcode 15 or later, you might encounter a Sandbox: rsync.samba deny(1) error during compilation. This is caused by Xcode’s default User Script Sandboxing.Solution:
  1. Select your Project in Xcode.
  2. Navigate to the Build Settings tab.
  3. Search for ENABLE_USER_SCRIPT_SANDBOXING.
  4. Change its value from Yes to No.

Configure Application Information and Keys

Bind Application Bundle ID

Follow Bind Application Information to bind your macOS application Bundle ID in the console, for example: com.example.app.

Get credentials

Follow Get AppID and AppKey to obtain appId and appKey. Open demo/macos/FBExampleObjc/BeautyCameraViewController.m and set credentials on FBEngineConfig.
If licenseToken is non-empty, the SDK validates that token locally and does not call /facebetter/v2/auth with appId / appKey. See Auth & License.

Run the Project

Open demo/macos/FBExampleObjc.xcworkspace.
  1. Ensure Xcode project signing is correct.
Xcode Signing
  1. Allow outgoing network access if you use online appId / appKey auth (App Sandbox).
macOS network permission
  1. Build and run.
Select a Mac (or Simulator) and click the build and run button.