Cortex Library for Mobile
  • Getting Started
  • Objective-C API for iOS
    • CortexLib class
    • CortexClient class
    • CortexClientDelegate protocol
  • Java API for Android
    • EmotivLibraryLoader class
    • CortexLib class
    • CortexClient class
  • Additional JSON methods
    • loginWithAuthenticationCode
    • logout
    • queryVirtualHeadsets
    • createVirtualHeadset
    • deleteVirtualHeadset
    • updateVirtualHeadset
    • triggerVirtualHeadsetEvent
    • Virtual headset object
    • freeUpRecords
  • Release Notes
Powered by GitBook
On this page
  • authenticationFinished
  • processResponse
  1. Objective-C API for iOS

CortexClientDelegate protocol

PreviousCortexClient classNextJava API for Android

Last updated 4 years ago

#import <EmotivCortexLib/CortexClient.h>
@protocol CortexClientDelegate
@required
- (void)authenticationFinished:(NSString* )authenticationCode 
                     withError:(NSError*)error;
- (void)processResponse:(NSString*)responseMessage;
@end

Your application must implement this protocol and use it as a delegate for the class .

authenticationFinished

- (void)authenticationFinished:(NSString* )authenticationCode
                     withError:(NSError*)error;

The Cortex Library calls authenticationFinished after you called the function . If there is no error, then the parameter authenticationCode contains a code that you can use to call the JSON API method .

processResponse

- (void)processResponse:(NSString*)responseMessage;

The argument responseMessage is a JSON message sent by the Cortex library.

CortexClient
loginWithAuthenticationCode
authenticate