TVOPreflightDelegate
Objective-C
@protocol TVOPreflightDelegate <NSObject>
Swift
protocol TVOPreflightDelegate : NSObjectProtocol
TVOPreflightDelegate provides callbacks when important changes to a TVOPreflightTest occur.
-
@brief Notifies the delegate that the preflight test is completed successfully.
@discussion The state of the
<TVOPreflightTest>will beTVOPreflightTestStatusCompletedat this point.Declaration
Objective-C
- (void)preflight:(nonnull TVOPreflightTest *)preflightTest didCompleteWithReport:(nonnull TVOPreflightReport *)report;Swift
func preflight(_ preflightTest: TVOPreflightTest, didCompleteWith report: TVOPreflightReport)Parameters
preflightTestThe
<TVOPreflightTest>.reportThe
<TVOPreflightReport>. -
@brief Notifies the delegate that the preflight test has failed.
@discussion The state of the
<TVOPreflightTest>will beTVOPreflightTestStatusFailedat this point.Declaration
Objective-C
- (void)preflight:(nonnull TVOPreflightTest *)preflightTest didFailWithError:(nonnull NSError *)error;Swift
func preflight(_ preflightTest: TVOPreflightTest, didFailWithError error: any Error)Parameters
preflightTestThe
<TVOPreflightTest>that failed.errorThe
<NSError>that occurred. -
@brief Notifies the delegate that the preflight test call has successfully connected to Twilio.
@discussion The state of the
<TVOPreflightTest>will beTVOPreflightTestStatusConnectedat this point.Declaration
Objective-C
- (void)preflightDidConnect:(nonnull TVOPreflightTest *)preflightTest;Swift
func preflightDidConnect(_ preflightTest: TVOPreflightTest)Parameters
preflightTestThe
<TVOPreflightTest>. -
@brief Notifies the delegate that network quality warnings have changed for the preflight test.
@discussion The two sets will help the delegate find out what warnings have changed since the last callback was received.
See
TVOCall for more detail about<TVOCallQualityWarning>.Declaration
Objective-C
- (void)preflight:(nonnull TVOPreflightTest *)preflightTest didReceiveQualityWarnings:(nonnull NSSet<NSNumber *> *)currentWarnings previousWarnings:(nonnull NSSet<NSNumber *> *)previousWarnings;Swift
optional func preflight(_ preflightTest: TVOPreflightTest, didReceiveQualityWarnings currentWarnings: Set<NSNumber>, previousWarnings: Set<NSNumber>)Parameters
preflightTestThe
<TVOPreflightTest>that received quality warning updates.currentWarningsAn
<NSSet>that contains the warnings at the instant of receiving this callback. Values in the<NSSet> are<NSNumber>with values of<TVOCallQualityWarning>.previousWarningsAn
<NSSet>that contains the warnings before receiving this callback. Values in the<NSSet> are<NSNumber>with values of<TVOCallQualityWarning>. -
@brief Notifies the delegate that a new stats sample has been received.
@discussion This callback will be raised every second once the preflight test has connected.
Declaration
Objective-C
- (void)preflight:(nonnull TVOPreflightTest *)preflightTest didReceiveStatsSample:(nonnull TVOPreflightStatsSample *)statsSample;Swift
optional func preflight(_ preflightTest: TVOPreflightTest, didReceive statsSample: TVOPreflightStatsSample)Parameters
preflightTestThe
<TVOPreflightTest>that received the stats sample.statsSampleThe
<TVOPreflightStatsSample>.