TVOConnectOptions
Objective-C
@interface TVOConnectOptions : TVOCallOptions
Swift
class TVOConnectOptions : TVOCallOptions
@brief TVOConnectOptions represents a custom configuration to use when connecting a Call.
@discussion Connect options builder to use when connecting. For example:
let connectOptions = TVOConnectOptions(accessToken: accessToken) { builder in
builder.params = ["to": "bob"]
builder.enableIceGatheringOnAnyAddressPorts = true
}
let call = TwilioVoiceSDK.connect(with: connectOptions, delegate: callDelegate)
See
TVOCallOptions-
@brief A JWT access token which will be used to connect a Call.
Declaration
Objective-C
@property (nonatomic, copy, readonly, nullable) NSString *accessToken;Swift
var accessToken: String? { get } -
@brief The parameters passed to the server application associated with this Call.
Declaration
Objective-C
@property (nonatomic, copy, readonly, nonnull) NSDictionary<NSString *, NSString *> *params;Swift
var params: [String : String] { get } -
Unavailable
Use optionsWithToken: or optionsWithToken:block: to create a TVOConnectOptions instance.
@brief Developers shouldn’t initialize this class directly.
@discussion Use the class methods
optionsWithToken:oroptionsWithToken:block:instead.Declaration
Objective-C
- (null_unspecified instancetype)init; -
@brief Creates
TVOConnectOptionsusing an access token.@discussion The maximum number of characters for the identity provided in the token is 121. The identity may only contain alpha-numeric and underscore characters. Other characters, including spaces, or exceeding the maximum number of characters, will result in not being able to place or receive calls.
Declaration
Objective-C
+ (nonnull instancetype)optionsWithAccessToken:(nonnull NSString *)accessToken;Swift
convenience init(accessToken: String)Parameters
accessTokenA JWT access token which will be used to connect to the Call.
Return Value
An instance of
TVOConnectOptions. -
@brief Creates an instance of
TVOConnectOptionsusing an access token and a builder block.@discussion The maximum number of characters for the identity provided in the token is 121. The identity may only contain alpha-numeric and underscore characters. Other characters, including spaces, or exceeding the maximum number of characters, will result in not being able to place or receive calls.
Declaration
Objective-C
+ (nonnull instancetype) optionsWithAccessToken:(nonnull NSString *)accessToken block:(nonnull TVOConnectOptionsBuilderBlock)block;Swift
convenience init(accessToken: String, block: @escaping TVOConnectOptionsBuilderBlock)Parameters
accessTokenA JWT access token which will be used to connect to the Call.
blockThe builder block which will be used to configure the
TVOConnectOptionsinstance.Return Value
An instance of
TVOConnectOptions.