NXMClient

@interface NXMClient

Undocumented

  • Undocumented

    Declaration

    Objective-C

    @property (readonly, nonatomic, nonnull, class) NXMClient *shared;
  • Undocumented

    Declaration

    Objective-C

    @property (readonly, getter=getConnectionStatus, assign, nonatomic)
        int connectionStatus;
  • Undocumented

    Declaration

    Objective-C

    @property (readonly, getter=getUser, nonatomic, nullable) NXMUser *user;
  • Undocumented

    Declaration

    Objective-C

    @property (readonly, getter=getToken, nonatomic, nullable) int *authToken;
  • Undocumented

    Declaration

    Objective-C

    - (void)setDelegate:(nonnull id<NXMClientDelegate>)delegate;
  • Undocumented

    Declaration

    Objective-C

    - (void)loginWithAuthToken:(id)authToken;
  • Undocumented

    Declaration

    Objective-C

    - (void)updateAuthToken:(id)authToken;
  • Undocumented

    Declaration

    Objective-C

    - (void)logout;
  • Get a conversation object by id @brief getConversation With a specific Id

    Declaration

    Objective-C

    - (void)getConversationWithUUid:(id)uuid
                  completionHandler:(void (^_Nullable)(int *_Nullable,
                                                       NXMConversation *_Nullable))
                                        completionHandler;

    Parameters

    uuid

    conversation id

    completionHandler

    completion block @code [myNXNClient getConversationWithUUid:conversationId completion:(void(^_Nullable)(NSError * _Nullable error, NXMConversation * _Nullable conversation))completion{ if (!error){ NXMConversation myConversation = conversation; } }];

  • @brief Create a new conversation with specific name: it is a unique per nexmo application

    Declaration

    Objective-C

    - (void)createConversationWithName:(id)name
                     completionHandler:
                         (void (^_Nullable)(int *_Nullable,
                                            NXMConversation *_Nullable))
                             completionHandler;

    Parameters

    name

    conversation name

    completionHandler

    completion block @code [myNXNClient createConversationWithName:uniqueName completion:(void(^_Nullable)(NSError * _Nullable error, NXMConversation * _Nullable conversation)){ if (!error) NXMConvertion myNamedConversation = convetsation; }];

  • @brief Create a new call to users

    Declaration

    Objective-C

    - (void)call:(id)callee
              callHandler:(id)callHandler
        completionHandler:(void (^_Nullable)(int *_Nullable,
                                             NXMCall *_Nullable))completionHandler;

    Parameters

    callee

    user ids/name or pstn number to call

    callHandler

    type of the call (InApp/SERVER)

    completionHandler

    completion block @code [myNXNClient call:usernames callHandler:NXMCallHandlerInApp delegate:callDelegate completion:(void(^_Nullable)(NSError * _Nullable error, NXMCall * _Nullable call)){ if (!error){ NXMCall myCall = call; }];

  • @brief Enable push notification for specific device

    Declaration

    Objective-C

    - (void)enablePushNotificationsWithDeviceToken:(id)deviceToken
                                         isPushKit:(id)isPushKit
                                         isSandbox:(id)isSandbox
                                 completionHandler:
                                     (void (^_Nullable)(int *_Nullable))
                                         completionHandler;

    Parameters

    deviceToken

    the device token

    isPushKit

    is the app using PushKit

    isSandbox

    is apple sandbox enviroment

    completionHandler

    completion block @code [myNXNClient enablePushNotificationsWithDeviceToken:deviceToken isPushKit:isPushKit isSandbox:isSandbox completion:(void(^_Nullable)(NSError * _Nullable error))completion{ }];

  • @brief Disable push notification for current device

    Declaration

    Objective-C

    - (void)disablePushNotifications:
        (void (^_Nullable)(int *_Nullable))completionHandler;

    Parameters

    completionHandler

    completion block @code [myNXNClient disablePushNotificationsWithCompletion:(void(^_Nullable)(NSError * _Nullable error))completion{ }];

  • @brief Check if a push notification is a NexmoPush, Call this method on incoming push

    Declaration

    Objective-C

    - (id)isNexmoPushWithUserInfo:(id)userInfo;

    Parameters

    userInfo

    pushInfo

    Return Value

    true if nexmo push @code BOOL isNexmoPush = [myNXNClient isNexmoPushWithUserInfo:userInfo]; if (isNexmoPush){ [myNXNClient processNexmoPushWithUserInfo:userInfo completion:(void(^_Nullable)(NSError * _Nullable error)){ if (!error){ NSLog(@Process a Nexmo push); }];

  • @brief process Nexmo push, Call this method when isNexmoPushWithUserInfo:userInfo return true

    Declaration

    Objective-C

    - (void)processNexmoPushWithUserInfo:(id)userInfo
                       completionHandler:
                           (void (^_Nullable)(int *_Nullable))completionHandler;

    Parameters

    userInfo

    pushInfo

    completionHandler

    completion block @code BOOL isNexmoPush = [myNXNClient isNexmoPushWithUserInfo:userInfo]; if (isNexmoPush){ [myNXNClient processNexmoPushWithUserInfo:userInfo completion:(void(^_Nullable)(NSError * _Nullable error)){ if (!error){ NSLog(@Process a Nexmo push); }];