Skip to main content
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

Map codes in one place:

Engine events

FBEngineCallbacks.onEngineEvent reports license and init asynchronously. Set callbacks immediately after creating the engine.
createEngineWithConfig: returning a non-nil instance does not replace listening for event 1 / 101. Online auth can still fail after construction.

Image processing

Validate the frame, set type, and treat a nil return as FBErrorCode_Process.
Save with toFile: (returns FBErrorCode):

Logging

Enable logs before creating the engine. Create the log directory if you write a file.

Practical checks

  • -1 Invalid argument: empty .fbd path, nil NSData, intensity outside the documented range, or a nil config.
  • -2 Not initialized: calling setters after a failed createEngineWithConfig: (the instance is nil — do not send messages to it).
  • -3 License: wrong appId / appKey, unbound Bundle ID, expired token, or no network for online auth. See Auth & License.
  • -5 I/O: missing filter / sticker / background file, or unreadable sandbox path.
  • External GL: if externalContext = YES, create and process on the same OpenGL ES thread; otherwise processImage: can return nil.