Skip to content

Releases: cyberlabsai/perse-sdk-ios

0.2.0

01 Sep 16:09
d50b1eb
Compare
Choose a tag to compare

💥 Breaking Changes

Complete breaking changes in the Responses, Methods and your usages. Motivations:

  • Improve cohesion;
  • Patterning with the methods;
  • Prepare for future features, like the "vox"s;

API Responses

Deprecated New Usage
CompareResponse PerseAPIResponse.Face.Compare
DetectResponse PerseAPIResponse.Face.Detect
FaceResponse PerseAPIResponse.Face.Face
MetricsResponse PerseAPIResponse.Face.Metrics
LandmarksResponse PerseAPIResponse.Face.Landmarks

Methods

Deprecated New
func detect( _ filePath: String, onSuccess: @escaping (DetectResponse) -> Void, onError: @escaping (String, String) -> Void) func detect( _ filePath: String, onSuccess: @escaping (PerseAPIResponse.Face.Detect) -> Void, onError: @escaping (String, String) -> Void)
func detect( _ data: Data, onSuccess: @escaping (DetectResponse) -> Void, onError: @escaping (String, String) -> Void) func detect( _ data: Data, onSuccess: @escaping (PerseAPIResponse.Face.Detect) -> Void, onError: @escaping (String, String) -> Void)
func compare( _ firstFilePath: String, _ secondFilePath: String, onSuccess: @escaping (CompareResponse) -> Void, onError: @escaping (String, String) -> Void) func compare( _ firstFilePath: String, _ secondFilePath: String, onSuccess: @escaping (PerseAPIResponse.Face.Compare) -> Void, onError: @escaping (String, String) -> Void)
func compare( _ firstData: Data, _ secondData: Data, onSuccess: @escaping (CompareResponse) -> Void, onError: @escaping (String, String) -> Void) func compare( _ firstData: Data, _ secondData: Data, onSuccess: @escaping (PerseAPIResponse.Face.Compare) -> Void, onError: @escaping (String, String) -> Void)

✨ New Feature

Face Enrollment

Enrolled faces are persisted and can be used for saving biometric facial features for future use. The enrollment's methods allow you to create, update, delete and get enrolled faces.

face.enrollment.create

  • Responsible for creating new enrollment;
  • Extract the facial features of the largest face;
  • Faces that are not completely inside the image will not be considered;
  • The input can be the image file path or his Data;
  • The onSuccess type is PerseAPIResponse.Face.Enrollment.Create struct;
func create(
    _ filePath: String,
    onSuccess: @escaping (PerseAPIResponse.Face.Enrollment.Create) -> Void,
    onError: @escaping (String, String) -> Void
)
func create(
    _ data: Data,
    onSuccess: @escaping (PerseAPIResponse.Face.Enrollment.Create) -> Void,
    onError: @escaping (String, String) -> Void
)

face.enrollment.update

  • Responsible for update a face enrollment with a new face image and user token;
  • Extract the facial features of the largest face;
  • Faces that are not completely inside the image will not be considered;
  • The input can be the image file path or his Data;
  • The onSuccess type is PerseAPIResponse.Face.Enrollment.Update struct;
func update(
    _ filePath: String,
    _ userToken: String,
    onSuccess: @escaping (PerseAPIResponse.Face.Enrollment.Update) -> Void,
    onError: @escaping (String, String) -> Void
)
func update(
    _ data: Data,
    _ userToken: String,
    onSuccess: @escaping (PerseAPIResponse.Face.Enrollment.Update) -> Void,
    onError: @escaping (String, String) -> Void
)

face.enrollment.delete

  • Responsible for delete an enrollment;
  • This endpoint expects a "user token" in the url;
  • The onSuccess type is PerseAPIResponse.Face.Enrollment.Delete struct;
func delete(
    onSuccess: @escaping (PerseAPIResponse.Face.Enrollment.Delete) -> Void,
    onError: @escaping (String, String) -> Void
)

face.enrollment.read

  • Responsible the complete list of the created "user tokens";
  • The onSuccess type is PerseAPIResponse.Face.Enrollment.Read struct;
func read(
    onSuccess: @escaping (PerseAPIResponse.Face.Enrollment.Read) -> Void,
    onError: @escaping (String, String) -> Void
)

🐛 Bug Fix

Fix terms "underexpose" to "underexposure" in the Demo project.

⚡️ Improvements

Change the tests names to the camel case pattern for better reading. This changes has no impact in tests usage.

0.1.2

16 Aug 19:04
deccacd
Compare
Choose a tag to compare

⚡️ Improvements

  • Add Development.xcconfig;
  • Add API_KEY and BASE_URL in the info.plist;
  • Add "base url" usage to init Perse in the example;
  • Add "base url" usage in the tests;

0.1.1

05 Aug 21:14
Compare
Choose a tag to compare

🐛 Bug Fix

  • Fix Perse.podspec to publish in the CocoaPods;

0.1.0

05 Aug 19:18
ac2eb25
Compare
Choose a tag to compare

✨ New Feature

  • Add optional second parameter on init:
public init(apiKey: String, baseUrl: String = "https://api.getperse.com/v0/")

⚡️ Improvements

  • Add code comments in the whole project;
  • Handle camera events when no API Key set;
  • Update and improve tests based on the Perse Lite previous release 0.1.1;

⬆️ Upgrade Dependencies

0.0.1

26 Jul 20:05
Compare
Choose a tag to compare

🎉 First release!

See the complete documentation in the README.