Skip to content

efrederickson/Appellancy-API

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NOW THE EXAMPLE PROJECT IS IN https://github.com/mlnlover11/Appellancy

This is outdated, old, and don't use it. use the one in https://github.com/mlnlover11/Appellancy

Appellancy API & Sample

Using the API is incredibly easy. 
You’ll need to create a delegate class object for Appellancy.
Copy from the example project here for ease of use ;).

It looks for $THEOS to build from so make sure that is set up correctly.

Any problems or questions, don’t hesitate to ask!

——————————————————————————————————————————————————————————————————
As of 0.0.2-1, the API has been re-written to use /usr/lib/libAppellancy.dylib instead of /Library/MobileSubstrate/DynamicLibraries/Appellancy.dylib.
The notification system using CFNotificationCenter remains the same.

To link with Appellancy use:
    project_LIBRARIES += Appellancy
and make sure that “libAppellancy.dylib” is in $THEOS/lib/

——————————————————————————————————————————————————————————————————

As of 0.0.1-160, you can listen for accepted Notifications using CFNotificationCenter. this only makes sense if you are running a lock screen tweak of some sort.

The events are:
#define AFaceAccepted "com.efrederickson.appellancy.face_accepted"
#define AFaceRejected "com.efrederickson.appellancy.face_rejected"

And to listen, use:
CFNotificationCenterRef r = CFNotificationCenterGetDarwinNotifyCenter();
    CFNotificationCenterAddObserver(r, NULL, &face_accepted_notification, CFSTR(AFaceAccepted), NULL, 0);
And, of course, define the face_accepted_notification function or whatever you need to do.

——————————————————————————————————————————————————————————————————


Code under WTFPL. No guarantees the sample actually works, although i have tested it.