Objective-C API for iOS
Last updated
Last updated
On iOS, the Cortex library provides an API written in Objective-C. It contains only two classes:
to initialize the Cortex library
to send and receive JSON messages to the Cortex library
On iOS, the basic workflow of the API is as follow:
Call the static method start of the class
Alloc and init an object from the class
Call the method setDelegate of the object
Call the method sendRequest of the object to send JSON messages to the Cortex library. You can call this methods as many times as necessary. Cortex will respond asynchronously, using the delegate you provided at step 4. Please check the to know the format of the JSON messages.
Call the static method stop of the class