Classes

The following classes are available globally.

  • Undocumented

    See more

    Declaration

    Objective-C

    @interface CSErrorCodes : NSObject
    
    @property (class, readonly, copy) NSString* CONVERSATION_DUPLICATE_NAME NS_SWIFT_NAME(CONVERSATION_DUPLICATE_NAME);
    @property (class, readonly, copy) NSString* MEMBER_ALREADY_JOINED
        NS_SWIFT_NAME(MEMBER_ALREADY_JOINED);
    @property (class, readonly, copy) NSString* MEMBER_ALREADY_INVITED
        NS_SWIFT_NAME(MEMBER_ALREADY_INVITED);
    @property (class, readonly, copy) NSString* CONVERSATION_NOT_FOUND
        NS_SWIFT_NAME(CONVERSATION_NOT_FOUND);
    @property (class, readonly, copy) NSString* MEMBER_NOT_FOUND
        NS_SWIFT_NAME(MEMBER_NOT_FOUND);
    @property (class, readonly, copy) NSString* USER_NOT_FOUND
        NS_SWIFT_NAME(USER_NOT_FOUND);
    @property (class, readonly, copy) NSString* INVALID_CURSOR
        NS_SWIFT_NAME(INVALID_CURSOR);
    @property (class, readonly, copy) NSString* VALIDATION_FAIL
        NS_SWIFT_NAME(VALIDATION_FAIL);
    @property (class, readonly, copy) NSString* CONVERSATION_MAX_NUMBER_OF_MEMBERS
        NS_SWIFT_NAME(CONVERSATION_MAX_NUMBER_OF_MEMBERS);
    @property (class, readonly, copy) NSString* CUSTOM_DATA_OVERALL_LIMIT_EXCEEDED
        NS_SWIFT_NAME(CUSTOM_DATA_OVERALL_LIMIT_EXCEEDED);
    /**
     TODO: Expand this with new CS Error codes.
     Make sure to also add a getter in the .m file
     */
    
    
    ///DO NOT TOUCH: Boilerplate to make it behave like a Kotlin object
    ///
    - (instancetype)init UNAVAILABLE_ATTRIBUTE;
    + (instancetype)new UNAVAILABLE_ATTRIBUTE;
    - (instancetype)copy UNAVAILABLE_ATTRIBUTE;
    - (instancetype)mutableCopy UNAVAILABLE_ATTRIBUTE;
    + (instancetype)copy UNAVAILABLE_ATTRIBUTE;
    + (instancetype)mutableCopy UNAVAILABLE_ATTRIBUTE;
    + (instancetype)alloc UNAVAILABLE_ATTRIBUTE;
    - (void)dealloc UNAVAILABLE_ATTRIBUTE;
    ///
    
    @end

    Swift

    class CSErrorCodes : NSObject
  • Undocumented

    See more

    Declaration

    Objective-C

    @interface SessionErrorCodes : NSObject
    
    @property (class, readonly, copy) NSString* EMPTY_TOKEN
        NS_SWIFT_NAME(EMPTY_TOKEN);
    @property (class, readonly, copy) NSString* FORCED_DISCONNECT
        NS_SWIFT_NAME(FORCED_DISCONNECT);
    @property (class, readonly, copy) NSString* TIMEOUT
        NS_SWIFT_NAME(TIMEOUT);
    @property (class, readonly, copy) NSString* INTERNAL_FAILURE
        NS_SWIFT_NAME(INTERNAL_FAILURE);
    @property (class, readonly, copy) NSString* NO_ACTIVE_SESSION
        NS_SWIFT_NAME(NO_ACTIVE_SESSION);
    @property (class, readonly, copy) NSString* ALREADY_ACTIVE_SESSION
        NS_SWIFT_NAME(ALREADY_ACTIVE_SESSION);
    @property (class, readonly, copy) NSString* INVALID_TOKEN
        NS_SWIFT_NAME(INVALID_TOKEN);
    @property (class, readonly, copy) NSString* EXPIRED_TOKEN
        NS_SWIFT_NAME(EXPIRED_TOKEN);
    @property (class, readonly, copy) NSString* INVALID_USER
        NS_SWIFT_NAME(INVALID_USER);
    @property (class, readonly, copy) NSString* AUTHORIZATION_ERROR
        NS_SWIFT_NAME(AUTHORIZATION_ERROR);
    @property (class, readonly, copy) NSString* INVALID_SESSION
        NS_SWIFT_NAME(INVALID_SESSION);
    @property (class, readonly, copy) NSString* MAX_OPEN_SESSIONS
        NS_SWIFT_NAME(MAX_OPEN_SESSIONS);
    @property (class, readonly, copy) NSString* INVALID_SOCKET_TRANSPORT
        NS_SWIFT_NAME(INVALID_SOCKET_TRANSPORT);
    @property (class, readonly, copy) NSString* CLIENT_DISCONNECT
        NS_SWIFT_NAME(CLIENT_DISCONNECT);
    @property (class, readonly, copy) NSString* PING_TIMEOUT_DISCONNECT
        NS_SWIFT_NAME(PING_TIMEOUT_DISCONNECT);
    @property (class, readonly, copy) NSString* TRANSPORT_CLOSED_DISCONNECT
        NS_SWIFT_NAME(TRANSPORT_CLOSED_DISCONNECT);
    
    ///DO NOT TOUCH: Boilerplate to make it behave like a Kotlin object
    ///
    - (instancetype)init UNAVAILABLE_ATTRIBUTE;
    + (instancetype)new UNAVAILABLE_ATTRIBUTE;
    - (instancetype)copy UNAVAILABLE_ATTRIBUTE;
    - (instancetype)mutableCopy UNAVAILABLE_ATTRIBUTE;
    + (instancetype)copy UNAVAILABLE_ATTRIBUTE;
    + (instancetype)mutableCopy UNAVAILABLE_ATTRIBUTE;
    + (instancetype)alloc UNAVAILABLE_ATTRIBUTE;
    - (void)dealloc UNAVAILABLE_ATTRIBUTE;
    ///
    
    @end

    Swift

    class SessionErrorCodes : NSObject

NXMClientDelegate

  • Undocumented

    See more

    Declaration

    Objective-C

    @interface VGBaseClient: NSObject
    
    @property (weak) id<VGBaseClientDelegate> delegate;
    
    - (instancetype)initWithConfig:(VGClientInitConfig *)config
    NS_SWIFT_NAME(init(_:));
    
    - (void)setConfig:(VGClientConfig *)config;
    
    /**
     Create a session using an authToken and a sessionId.
     
     - Parameters:
        - authToken: The user authentication token.
        - sessionId: (Optional) The ID of the session to reconnect to.
        - callback: The callback that will be executed on completion.
     It will specify either the `error` occurred (if any) or the `sessionId` (on success).
     */
    - (void)createSession:(nonnull NSString *)authToken sessionId:(NSString * _Nullable)sessionId callback:(void (^)(NSError * _Nullable error, NSString * _Nullable sessionId))callback
    NS_SWIFT_ASYNC(3);
    
    /**
     Create a session using an authToken.
     
     - Parameters:
        - authToken: The user authentication token.
        - callback: The callback that will be executed on completion.
     It will specify either the `error` occurred (if any) or the `sessionId` (on success).
     */
    - (void)createSession:(nonnull NSString *)authToken callback:(void (^)(NSError * _Nullable error, NSString * _Nullable sessionId))callback
    NS_SWIFT_ASYNC(2);
    
    /**
     * Delete session with an error callback
     * @param callback callback with the error of the deleteSession
     * @code [myNXNClient deleteSession:(void (^)(NSError * _Nullable)];
     */
    - (void)deleteSession:(void (^)(NSError * _Nullable error))callback
    NS_SWIFT_ASYNC(1);
    
    /**
     * Refresh the current session with token
     * @param authToken user authentication authToken
     * @param callback callback with the error of the refreshSession
     * @code [myNXNClient refreshSession:(NSString *)authToken callback:(void (^)(NSError * _Nullable))]
     */
    - (void)refreshSession:(nonnull NSString *)authToken callback:(void (^)(NSError * _Nullable error))callback
    NS_SWIFT_ASYNC(2);
    
    /**
     This method is used to retrieve the details of a specific conversation.
     
     - Parameters:
        - conversationIdOrName: The ID or name of the conversation.
        - callback: A function to be called upon completion of the method.
     It takes in two parameters:
     [Error] If an error occurs, this will contain information about the error. If the method is successful, this will be nil.
     [Conversation] If the method is successful, this will contain the requested conversation. If an error occurs, this will be nil.
    */
    - (void)getConversation:(nonnull VGConversationIdOrName)conversationIdOrName callback:(nonnull void (^)(NSError * _Nullable error, VGConversation * _Nullable conversation))callback
    NS_SWIFT_NAME(getConversation(_:callback:))
    NS_SWIFT_ASYNC(2);
    
    /**
     This method is used to retrieve a user object based on the provided user ID or name.
     
     - Parameters:
        - userIdOrName: The user ID or name of the user to retrieve.
        - callback: A function to be called upon completion of the method.
     It takes in two parameters:
     [Error] If an error occurs, this will contain information about the error. If the method is successful, this will be nil.
     [User] If the method is successful, this will contain the requested user. If an error occurs, this will be nil.
    */
    - (void)getUser:(nonnull VGUserIdOrName)userIdOrName callback:(nonnull void (^)(NSError * _Nullable error, VGUser * _Nullable user))callback
    NS_SWIFT_NAME(getUser(_:callback:))
    NS_SWIFT_ASYNC(2);
    
    + (enum VGPushType) vonagePushType:(nullable NSDictionary *)dict;
    
    /**
     * Register Device VoIP and Device Tokens for Push
     * @param voipToken VoIP token used for VoIP push and CallKit
     * @param deviceToken device token for push notifications
     * @param isSandbox are tokens for sandbox APNS push environment (default production)
     * @param callback with the error and success with deviceId of the registerVoipToken:withDeviceToken
     * @code [vonageClient registerVoipToken:(NSData * _Nonnull) withDeviceToken:(NSData * _Nullable) isSandbox:(Boolean * _Nullable) callback:(void (^)(NSError * _Nullable, NSString * _Nullable))]
     */
    - (void)registerVoipToken:(NSData * _Nullable)voipToken withDeviceToken:(NSData * _Nullable)deviceToken isSandbox:(BOOL)isSandbox callback:(nonnull void (^)(NSError * _Nullable error, NSString * _Nullable deviceId))callback
    NS_SWIFT_ASYNC(4);
    
    /**
     * Register Device VoIP and Device Tokens for Push
     * @param voipToken VoIP token used for VoIP push and CallKit
     * @param deviceToken device token for push notifications
     * @param callback with the error and success with deviceId of the registerVoipToken:withDeviceToken
     * @code [vonageClient registerVoipToken:(NSData * _Nonnull) withDeviceToken:(NSData * _Nullable) callback:(void (^)(NSError * _Nullable, NSString * _Nullable))]
     */
    - (void)registerVoipToken:(NSData * _Nullable)voipToken withDeviceToken:(NSData * _Nullable)deviceToken callback:(nonnull void (^)(NSError * _Nullable error, NSString * _Nullable deviceId))callback
    NS_SWIFT_ASYNC(3);
    
    /**
     * Unregister the device push and or VOIP token
     * @param deviceId device id returned from the registerDevicePushToken method
     * @param callback callback with the error of the refreshSession
     * @code [myNXNClient unregisterDeviceTokensByDeviceId:(nonnull NSString *)deviceId callback:(void (^)(NSError * _Nullable))]
     */
    
    - (void)unregisterDeviceTokensByDeviceId:(nonnull NSString *)deviceId callback:(nonnull void (^)(NSError * _Nullable error))callback  
    NS_SWIFT_ASYNC(2);
    
    
    @end

VGChannel

  • Undocumented

    See more

    Declaration

    Objective-C

    @interface VGChannel : NSObject
    
    @property (readonly, nullable) NSString* id;
    @property (readonly, nullable) NSString* number;
    
    - (instancetype)init __attribute__((unavailable));
    
    @end

    Swift

    class VGChannel : NSObject

VGUserChannels

  • Undocumented

    See more

    Declaration

    Objective-C

    @interface VGUserChannels : NSObject
    
    @property (readonly, nullable) NSArray<VGChannel *>* app;
    @property (readonly, nullable) NSArray<VGChannel *>* phone;
    @property (readonly, nullable) NSArray<VGChannel *>* pstn;
    @property (readonly, nullable) NSArray<VGChannel *>* sip;
    @property (readonly, nullable) NSArray<VGChannel *>* vbc;
    @property (readonly, nullable) NSArray<VGChannel *>* websocket;
    @property (readonly, nullable) NSArray<VGChannel *>* sms;
    @property (readonly, nullable) NSArray<VGChannel *>* mms;
    @property (readonly, nullable) NSArray<VGChannel *>* whatsapp;
    @property (readonly, nullable) NSArray<VGChannel *>* viber;
    @property (readonly, nullable) NSArray<VGChannel *>* messenger;
    
    - (instancetype)init __attribute__((unavailable));
    
    @end

    Swift

    class VGUserChannels : NSObject

VGMemberChannel

  • Undocumented

    See more

    Declaration

    Objective-C

    @interface VGMemberChannel : NSObject
    
    @property(readonly) VGChannelType type;
    @property(readonly, nullable) VGChannel* from;
    @property(readonly, nullable) VGChannel* to;
    
    - (instancetype)init __attribute__((unavailable));
    
    @end

    Swift

    class VGMemberChannel : NSObject
  • Object containing Client configuration options.

    See more

    Declaration

    Objective-C

    @interface VGClientConfig : NSObject

VGClientInitConfig

VGConversationTimestamp

  • Undocumented

    See more

    Declaration

    Objective-C

    @interface VGConversationTimestamp : NSObject
    
    @property (readonly, nullable) NSString* created;
    @property (readonly, nullable) NSString* updated;
    @property (readonly, nullable) NSString* destroyed;
    
    - (instancetype)init __attribute__((unavailable));
    
    @end

VGConversationProperties

  • Undocumented

    See more

    Declaration

    Objective-C

    @interface VGConversationProperties : NSObject
    
    @property (nullable) NSNumber * ttl;
    @property (nullable) NSString * customSortKey;
    @property (nullable) NSString * customData;
    
    
    - (instancetype)init __attribute__((unavailable));
    @end

VGConversation

VGError

  • Undocumented

    See more

    Declaration

    Objective-C

    @interface VGError : NSError
    
    @property (readonly) VGErrorType type;
    @property (readonly, nullable) NSString* errorCode;
    @property (readonly, nullable) NSString* message;
    
    - (instancetype)init __attribute__((unavailable));
    
    @end

    Swift

    class VGError : NSError

VGMemberTimestamp

  • Undocumented

    See more

    Declaration

    Objective-C

    @interface VGMemberTimestamp : NSObject
    
    @property (readonly, nullable) NSString* invited;
    @property (readonly, nullable) NSString* joined;
    @property (readonly, nullable) NSString* left;
    
    - (instancetype)init __attribute__((unavailable));
    
    @end

VGConversation

VGOption

  • Undocumented

    Declaration

    Objective-C

    @interface VGOption<ObjectType> : NSObject
    @end
  • Undocumented

    See more

    Declaration

    Objective-C

    @interface VGSome<ObjectType> : VGOption<ObjectType>
    @property ObjectType value;
    - (instancetype)init __attribute__((unavailable));
    - (instancetype) initWithValue:(ObjectType)value;
    
    @end
  • Undocumented

    Declaration

    Objective-C

    @interface VGNone<ObjectType> : VGOption<ObjectType>
    @end
  • Undocumented

    See more

    Declaration

    Objective-C

    @interface VGTopic : NSObject
    
    @property (readonly) NSString* name;
    @property (readonly) NSString* tag;
    
    #pragma mark TopicGroups
    @property (class, readonly) VGTopicGroup HTTP NS_SWIFT_NAME(HTTP);
    @property (class, readonly) VGTopicGroup WS NS_SWIFT_NAME(WS);
    @property (class, readonly) VGTopicGroup MEDIA NS_SWIFT_NAME(MEDIA);
    @property (class, readonly) VGTopicGroup API NS_SWIFT_NAME(API);
    @property (class, readonly) VGTopicGroup STORE NS_SWIFT_NAME(STORE);
    @property (class, readonly) VGTopicGroup REDUCER NS_SWIFT_NAME(REDUCER);
    @property (class, readonly) VGTopicGroup DEFAULT NS_SWIFT_NAME(DEFAULT);
    @property (class, readonly) VGTopicGroup WEBRTC NS_SWIFT_NAME(WEBRTC);
    
    - (instancetype) init __attribute__((unavailable));
    
    @end

    Swift

    class VGTopic : NSObject

VGUserTimestamp

  • Undocumented

    See more

    Declaration

    Objective-C

    @interface VGUserTimestamp : NSObject
    
    @property (readonly, nullable) NSString* created;
    @property (readonly, nullable) NSString* updated;
    @property (readonly, nullable) NSString* destroyed;
    
    - (instancetype)init __attribute__((unavailable));
    
    @end

VGUser

  • Undocumented

    See more

    Declaration

    Objective-C

    @interface VGUser : NSObject
    
    @property (readonly) VGUserId id;
    @property (readonly) VGUsername name;
    @property (readonly, nullable) NSString* displayName;
    @property (readonly, nullable) VGUserTimestamp* timestamp;
    @property (readonly, nullable) VGUserChannels* channels;
    @property (readonly, nullable) NSString* imageUrl;
    @property (readonly, nullable) NSString* customData;
    
    - (instancetype)init __attribute__((unavailable));
    
    @end
  • Undocumented

    See more

    Declaration

    Objective-C

    @interface VGCustomLogger : NSObject <VGLogger>
    @property (nonatomic, readonly, copy) NSString * _Nonnull name;
    @property (nonatomic, readonly) VGLoggingLevel minLogLevel;
    @property (nonatomic, readonly, copy) NSArray<VGTopicGroup> * _Nonnull topics;
    @property (nonatomic, readonly, copy) onLogCallback _Nonnull onLog;
    - (void)didReceiveLogWithLogLevel:(VGLoggingLevel)logLevel andTopic:(VGTopic * _Nonnull)topic andMessage:(NSString * _Nonnull)message;
    /// Create a new <code>VGCustomLogger</code> instance.
    /// Default values:
    /// <code>minLogLevel</code>: <code>.info</code>
    /// <code>topics</code>: <code>[VGTopic.DEFAULT]</code>
    /// \param name The name for the logger.
    ///
    /// \param minLogLevel The minimum logging level to use.
    ///
    /// \param topics An array of topic groups to subscribe to.
    ///
    /// \param onLog The callback to be invoked on a new log
    ///
    - (nonnull instancetype)initWithName:(NSString * _Nonnull)name minLogLevel:(VGLoggingLevel)minLogLevel topics:(NSArray<VGTopicGroup> * _Nonnull)topics onLog:(onLogCallback _Nonnull)onLog OBJC_DESIGNATED_INITIALIZER;
    @property (nonatomic, readonly, copy) NSString * _Nonnull description;
    - (nonnull instancetype)init SWIFT_UNAVAILABLE;
    + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
    @end
  • Undocumented

    See more

    Declaration

    Objective-C

    @interface VGGetCallLegsParameters : NSObject
    @property VGPresentingOrder order;
    @property NSInteger pageSize;
    @property (nullable) NSString* cursor;
    
    -(instancetype) initWithOrder:(VGPresentingOrder)order
                         pageSize:(NSInteger)pageSize
                           cursor:(NSString * _Nullable)cursor;
    @end

VGRTCQuality

  • Undocumented

    See more

    Declaration

    Objective-C

    @interface VGRTCQuality : NSObject
    @property (readonly) float mos_score;
    @property (readonly) float quality_percentage;
    @property (readonly) float jitter_min_var;
    @property (readonly) float jitter_max_var;
    @property (readonly) float jitter_loss_rate;
    @property (readonly) float jitter_burst_rate;
    @property (readonly) NSInteger flaw_total;
    @property (readonly) NSInteger packet_cnt;
    @property (readonly) float packet_loss_perc;
    @end

    Swift

    class VGRTCQuality : NSObject

VGRTCStats

  • Undocumented

    See more

    Declaration

    Objective-C

    @interface VGRTCStats : NSObject
    
    @property(readonly) NSInteger audioRecvPackets;
    @property(readonly) NSInteger audioRecvPacketsLost;
    @property(readonly) NSInteger audioRecvBytes;
    @property(readonly) double audioRecvJitter;
    @property(readonly) NSInteger audioSentPackets;
    @property(readonly) NSInteger audioSentBytes;
    @property(readonly) NSInteger audioSentPacketsLost;
    @property(readonly) double audioRtt;
    @property(readonly) double audioSentJitter;
    
    - (instancetype)init __attribute__((unavailable));
    
    @end

    Swift

    class VGRTCStats : NSObject

VGVoiceClient

  • Undocumented

    See more

    Declaration

    Objective-C

    @interface VGVoiceClient : VGBaseClient <VGVoiceClientAPI>
    @property (weak) id<VGVoiceClientDelegate> delegate;
    
    - (instancetype) init;
    
    @end
  • Undocumented

    See more

    Declaration

    Objective-C

    @interface VGVoiceLeg : NSObject
    @property NSString* _Nonnull legId;
    @property NSString* _Nonnull conversationId;
    @property NSString* _Nullable direction;
    @property NSString* _Nullable status;
    @property NSString* _Nullable startTime;
    @property NSString* _Nullable endTime;
    @property NSString* _Nullable type;
    @property VGVoiceLegChannel* _Nullable from;
    @property VGVoiceLegChannel* _Nullable to;
    @property VGVoiceMediaState* _Nullable mediaState;
    - (instancetype)init __attribute__((unavailable));
    @end
  • Undocumented

    See more

    Declaration

    Objective-C

    @interface VGVoiceLegChannel : NSObject
    @property NSString* _Nullable type;
    @property NSString* _Nullable user;
    @property NSString* _Nullable number;
    @end

    Swift

    class VGVoiceLegChannel : NSObject

VGVoiceLegsPage

  • Undocumented

    See more

    Declaration

    Objective-C

    @interface VGVoiceLegsPage : NSObject
    
    @property(readonly) NSArray<VGVoiceLeg*>* legs;
    @property(readonly, nullable) NSString* previousCursor;
    @property(readonly, nullable) NSString* nextCursor;
    
    - (instancetype)init __attribute__((unavailable));
    
    @end
  • Undocumented

    See more

    Declaration

    Objective-C

    @interface VGVoiceMediaState : NSObject
    @property Boolean mute;
    @property Boolean earmuff;
    @property Boolean playing_stream;
    @property Boolean tts;
    @property Boolean recording;
    @property Boolean transcribing;
    - (instancetype)init __attribute__((unavailable));
    
    @end

    Swift

    class VGVoiceMediaState : NSObject