跑通 iOS 示例程序
环境要求
- iOS 版本:
iOS 12.0及以上 - 开发语言:
Objective-C - 架构支持:
arm64
获取示例源码
克隆 github 仓库 到本地, 进入 ios/demo/FBExampleObjc 目录, 打开 Xcode 工程
bash
# clone
git clone https://github.com/pixpark/facebetter.git从 SDK 下载页面,下载最新的 iOS 版本库,放置到工程目录 ios/demo/FBExampleObjc/libs 中
配置 AppID 和 AppKey
按照 此页面 指引,获取 appid 和 appkey, 打开工程中 ViewController.m, 修改 appid 和 appkey
objc
FBEngineConfig *engineConfig = [[FBEngineConfig alloc] init];
engineConfig.appId = @"your appId";
engineConfig.appKey = @"your appkey";
self.beautyEffectEngine = [FBBeautyEffectEngine createEngineWithConfig:engineConfig];运行工程
打开 ios/demo/FBExampleObjc/FBExampleObjc.xcodeproj 工程
确保 Xcode 工程签名正确

确保
Facebetter库已经正确链接
编译运行
选择实体机设备,点击编译运行按钮即可