Skip to content

Run macOS Sample Application

Environment Requirements

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

Get Sample Source Code

Clone the GitHub repository locally, navigate to the macos/demo/FBExampleObjc directory, and open the Xcode project.

bash
# clone 
git clone https://github.com/pixpark/facebetter.git

Download the latest macOS version library from the SDK Download page and place it in the project directory macos/demo/FBExampleObjc/libs.

Configure AppID and AppKey

Follow the instructions on this page to get your appid and appkey. Open ViewController.m in the project and modify the appid and appkey.

objc
  FBEngineConfig *engineConfig = [[FBEngineConfig alloc] init];
  engineConfig.appId = @"your appId"; 
  engineConfig.appKey = @"your appkey"; 
 
  self.beautyEffectEngine = [FBBeautyEffectEngine createEngineWithConfig:engineConfig];

Run the Project

Open the macos/demo/FBExampleObjc/FBExampleObjc.xcodeproj project.

  1. Ensure Xcode project signing is correct Xcode Signing

  2. Ensure network permissions are enabled for appkey validation Xcode Signing

  3. Ensure the Facebetter library is properly linked Xcode Link Library

  4. Build and run

Select target device (Mac or Simulator) and click the build and run button.