This page matches SDK 2.0.0. Auth: Auth & License.
Error codes (FBErrorCode)
Setter APIs return int. 0 is success. createEngineWithConfig: and processImage: return objects (nil on failure).
Check return values
Engine events
FBEngineCallbacks.onEngineEvent reports license and init asynchronously. Set callbacks immediately after creating the engine.
Image processing
Validate the frame, settype, and treat a nil return as FBErrorCode_Process. macOS can handle larger stills; still reject zero-size buffers.
toFile: (returns FBErrorCode):
createWithNSImage: returns nil if the NSImage has no bitmap representation.
Logging
Enable logs before creating the engine. Create the log directory if you write a file. In a sandboxed Mac app, write under the container (for example Application Support), not an arbitrary path.macOS-specific failures
- App Sandbox: enable outgoing network for online
appId/appKey. User-selected files need security-scoped bookmarks (startAccessingSecurityScopedResource). -5I/O: the.fbd/ background image is outside the sandbox or the bookmark is not started.- CLI tools: if there is no Bundle ID, bind the process name in the Dashboard.
- External GL: if
externalContext = YES, create and process on the same OpenGL thread.
Practical checks
-1Invalid argument: empty.fbdpath, nilNSData, intensity outside the documented range, or a nil config.-2Not initialized: calling setters after a failedcreateEngineWithConfig:(the instance isnil).-3License: wrong credentials, unbound Bundle ID, expired token, or sandbox blocking the auth request. See Auth & License.

