NXMClientConfig
Objective-C
@interface NXMClientConfig : NSObject
Swift
class NXMClientConfig : NSObject
Object containing NXMClient endpoints configuration.
-
The API URL of the your chosen datacenter.
Declaration
Objective-C
@property (nonatomic, nonnull) NSString *apiUrl;
Swift
var apiUrl: String { get set }
-
The WebSocket URL of the your chosen datacenter.
Declaration
Objective-C
@property (nonatomic, nonnull) NSString *websocketUrl;
Swift
var websocketUrl: String { get set }
-
The IPS URL of the your chosen datacenter.
Declaration
Objective-C
@property (nonatomic, nonnull) NSString *ipsUrl;
Swift
var ipsUrl: String { get set }
-
Your chosen Interactive Connectivity Establishment (ICE) servers.
Declaration
Objective-C
@property (nonatomic, nonnull) NSArray<NSString *> *iceServerUrls;
Swift
var iceServerUrls: [String] { get set }
-
Optional API pinning configuration.
Declaration
Objective-C
@property (nonatomic, nullable) NXMPinningConfig *apiPinning;
Swift
var apiPinning: NXMPinningConfig? { get set }
-
Optional WebSocket pinning configuration.
Declaration
Objective-C
@property (nonatomic, nullable) NXMPinningConfig *websocketPinning;
Swift
var websocketPinning: NXMPinningConfig? { get set }
-
Whether to use the first ICE candidate or not.
Declaration
Objective-C
@property (nonatomic) BOOL useFirstIceCandidate;
Swift
var useFirstIceCandidate: Bool { get set }
-
Allow the sdk to automatically reconnect media when network interfaces changes
Declaration
Objective-C
@property (nonatomic) BOOL autoMediaReoffer;
Swift
var autoMediaReoffer: Bool { get set }
-
TTL value in seconds for push notification for the specific device. TTL ranges from 0 to 300.
Declaration
Objective-C
@property (nonatomic, nullable) NSNumber *pushNotificationTTL;
Swift
var pushNotificationTTL: NSNumber? { get set }
-
The default initializer for the class.
Default values:
apiURL: @"https://api.nexmo.com/" websocketUrl: @"https://ws.nexmo.com/" ipsUrl: @"https://api.nexmo.com/v1/image/" iceServerUrls: @[@"stun:stun.l.google.com:19302"] apiPublicKeys: NULL websocketPublicKeys: NULL useFirstIceCandidate: YES autoMediaReoffer: NO
Declaration
Objective-C
- (nonnull instancetype)init;
Swift
init()
-
-initWithApiUrl:
websocketUrl: ipsUrl: iceServerUrls: useFirstIceCandidate: autoMediaReoffer: pushNotificationTTL: An additional initializer for the class.
Declaration
Objective-C
- (nonnull instancetype)initWithApiUrl:(nonnull NSString *)apiURL websocketUrl:(nonnull NSString *)websocketUrl ipsUrl:(nonnull NSString *)ipsUrl iceServerUrls: (nonnull NSArray<NSString *> *)iceServerUrls useFirstIceCandidate:(BOOL)useFirstIceCandidate autoMediaReoffer:(BOOL)autoMediaReoffer pushNotificationTTL:(nullable NSNumber *)pushNotificationTTL;
Swift
init(apiUrl apiURL: String, websocketUrl: String, ipsUrl: String, iceServerUrls: [String], useFirstIceCandidate: Bool, autoMediaReoffer: Bool, pushNotificationTTL: NSNumber?)
Parameters
apiURL
The API URL of the your chosen datacenter.
websocketUrl
The WebSocket URL of the your chosen datacenter.
ipsUrl
The IPS URL of the your chosen datacenter.
iceServerUrls
Your chosen Interactive Connectivity Establishment (ICE) servers.
useFirstIceCandidate
Whether to use the first ICE candidate or not.
pushNotificationTTL
TTL value for push notification for the specific device.
-
A static helper for the Amsterdam datacenter.
Declaration
Objective-C
+ (nonnull NXMClientConfig *)AMS;
Swift
class func ams() -> NXMClientConfig
-
A static helper for the London datacenter.
Declaration
Objective-C
+ (nonnull NXMClientConfig *)LON;
Swift
class func lon() -> NXMClientConfig
-
A static helper for the Singapore datacenter.
Declaration
Objective-C
+ (nonnull NXMClientConfig *)SNG;
Swift
class func sng() -> NXMClientConfig
-
A static helper for the Dallas datacenter.
Declaration
Objective-C
+ (nonnull NXMClientConfig *)DAL;
Swift
class func dal() -> NXMClientConfig
-
A static helper for the Washington DC datacenter.
Declaration
Objective-C
+ (nonnull NXMClientConfig *)WDC;
Swift
class func wdc() -> NXMClientConfig
-
NXMClientConfig’s description.
Declaration
Objective-C
- (nonnull NSString *)description;
Swift
func description() -> String
-
Deprecated
generate a new instance with [NXMClientConfig new], then modify its properties before setting NXMClient’s configuration
An additional initializer for the class.
Declaration
Objective-C
- (nonnull instancetype)initWithApiUrl:(nonnull NSString *)apiURL websocketUrl:(nonnull NSString *)websocketUrl ipsUrl:(nonnull NSString *)ipsUrl;
Swift
init(apiUrl apiURL: String, websocketUrl: String, ipsUrl: String)
Parameters
apiURL
The API URL of the your chosen datacenter.
websocketUrl
The WebSocket URL of the your chosen datacenter.
ipsUrl
The IPS URL of the your chosen datacenter.
-
Deprecated
generate a new instance with [NXMClientConfig new], then modify its properties before setting NXMClient’s configuration
An additional initializer for the class.
Declaration
Objective-C
- (nonnull instancetype)initWithApiUrl:(nonnull NSString *)apiURL websocketUrl:(nonnull NSString *)websocketUrl ipsUrl:(nonnull NSString *)ipsUrl iceServerUrls: (nonnull NSArray<NSString *> *)iceServerUrls;
Swift
init(apiUrl apiURL: String, websocketUrl: String, ipsUrl: String, iceServerUrls: [String])
Parameters
apiURL
The API URL of the your chosen datacenter.
websocketUrl
The WebSocket URL of the your chosen datacenter.
ipsUrl
The IPS URL of the your chosen datacenter.
iceServerUrls
Your chosen Interactive Connectivity Establishment (ICE) servers.
-
Deprecated
generate a new instance with [NXMClientConfig new], then modify its properties before setting NXMClient’s configuration
An additional initializer for the class.
Declaration
Objective-C
- (nonnull instancetype)initWithApiUrl:(nonnull NSString *)apiURL websocketUrl:(nonnull NSString *)websocketUrl ipsUrl:(nonnull NSString *)ipsUrl useFirstIceCandidate:(BOOL)useFirstIceCandidate;
Swift
init(apiUrl apiURL: String, websocketUrl: String, ipsUrl: String, useFirstIceCandidate: Bool)
Parameters
apiURL
The API URL of the your chosen datacenter.
websocketUrl
The WebSocket URL of the your chosen datacenter.
ipsUrl
The IPS URL of the your chosen datacenter.
useFirstIceCandidate
Whether to use the first ICE candidate or not.
-
Deprecated
generate a new instance with [NXMClientConfig new], then modify its properties before setting NXMClient’s configuration
An additional initializer for the class.
Declaration
Objective-C
- (nonnull instancetype)initWithApiUrl:(nonnull NSString *)apiURL websocketUrl:(nonnull NSString *)websocketUrl ipsUrl:(nonnull NSString *)ipsUrl iceServerUrls: (nonnull NSArray<NSString *> *)iceServerUrls useFirstIceCandidate:(BOOL)useFirstIceCandidate;
Swift
init(apiUrl apiURL: String, websocketUrl: String, ipsUrl: String, iceServerUrls: [String], useFirstIceCandidate: Bool)
Parameters
apiURL
The API URL of the your chosen datacenter.
websocketUrl
The WebSocket URL of the your chosen datacenter.
ipsUrl
The IPS URL of the your chosen datacenter.
iceServerUrls
Your chosen Interactive Connectivity Establishment (ICE) servers.
useFirstIceCandidate
Whether to use the first ICE candidate or not.