Inherits from NSObject
Declared in Respoke.h

Overview

A global static class which provides access to the Respoke functionality.

Tasks

Other Methods

  • + sharedInstance

    Retrieve the globally shared instance of the Respoke SDK

  • – createClient

    This is one of two possible entry points for interating with the library. This method creates a new Client object which represents your app’s connection to the cloud infrastructure. This method does NOT automatically call the client.connect() method after the client is created, so your app will need to call it when it is ready to connect.

  • – unregisterClient:

    Unregister a client that is no longer active so that it’s resources can be deallocated

  • – registerPushToken:

    Notify the Respoke SDK that this device should register itself for push notifications

  • – unregisterPushServicesWithSuccessHandler:errorHandler:

    Unregister this device from the Respoke push notification service and stop any future notifications until it is re-registered

private Methods

Class Methods

makeGUID

+ (NSString *)makeGUID
Discussion

Create a globally unique identifier for naming instances

Return Value

New globally unique identifier

Declared In

Respoke+private.h

sharedInstance

+ (Respoke *)sharedInstance
Discussion

Retrieve the globally shared instance of the Respoke SDK

Return Value

Respoke SDK instance

Declared In

Respoke.h

Instance Methods

buildQueryWithComponents:

- (NSString *)buildQueryWithComponents:(NSDictionary *)components
Discussion

Create the query string portion of a url. Values should be either (NSString) or (NSArray) of (NSString*).

Return Value

the query string, including the “?” prefix

Declared In

Respoke+private.h

client:connectedWithEndpoint:

- (void)client:(RespokeClient *)client connectedWithEndpoint:(NSString *)endpointID

Declared In

Respoke+private.h

createClient

- (RespokeClient *)createClient
Discussion

This is one of two possible entry points for interating with the library. This method creates a new Client object which represents your app’s connection to the cloud infrastructure. This method does NOT automatically call the client.connect() method after the client is created, so your app will need to call it when it is ready to connect.

Return Value

A Respoke Client instance

Declared In

Respoke.h

encodeURIComponent:

- (NSString *)encodeURIComponent:(NSString *)component
Discussion

Percent-escape a single component of a url

Return Value

The escaped component

Declared In

Respoke+private.h

registerPushServices

- (void)registerPushServices
Discussion

Attempt to register push services for this device

Declared In

Respoke+private.h

registerPushToken:

- (void)registerPushToken:(NSData *)token
Discussion

Notify the Respoke SDK that this device should register itself for push notifications

Parameters

token

The token that identifies the device to APS.

Declared In

Respoke.h

unregisterClient:

- (void)unregisterClient:(RespokeClient *)client
Discussion

Unregister a client that is no longer active so that it’s resources can be deallocated

Parameters

client

The client to unregister

Declared In

Respoke.h

unregisterPushServicesWithSuccessHandler:errorHandler:

- (void)unregisterPushServicesWithSuccessHandler:(void ( ^ ) ( void ))successHandler errorHandler:(void ( ^ ) ( NSString *))errorHandler
Discussion

Unregister this device from the Respoke push notification service and stop any future notifications until it is re-registered

Parameters

successHandler

A block to call upon success

errorHandler

A block to call upon an error, passing the error message

Declared In

Respoke.h