Skip to content
This repository was archived by the owner on Jan 18, 2020. It is now read-only.

Commit 964aa4c

Browse files
Updates for using Voice iOS 4.0.0 (#174)
1 parent 07af5ef commit 964aa4c

File tree

5 files changed

+43
-3
lines changed

5 files changed

+43
-3
lines changed

Cartfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
github "twilio/twilio-voice-ios" >= 3.0.0
1+
github "twilio/twilio-voice-ios" >= 4.0.0
22

ObjCVoiceCallKitQuickstart/ViewController.m

+20
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,12 @@ - (void)cancelledCallInviteReceived:(TVOCancelledCallInvite *)cancelledCallInvit
321321
}
322322

323323
#pragma mark - TVOCallDelegate
324+
- (void)callDidStartRinging:(TVOCall *)call {
325+
NSLog(@"callDidStartRinging:");
326+
327+
[self.placeCallButton setTitle:@"Ringing" forState:UIControlStateNormal];
328+
}
329+
324330
- (void)callDidConnect:(TVOCall *)call {
325331
NSLog(@"callDidConnect:");
326332

@@ -335,6 +341,20 @@ - (void)callDidConnect:(TVOCall *)call {
335341
[self toggleAudioRoute:YES];
336342
}
337343

344+
- (void)call:(TVOCall *)call isReconnectingWithError:(NSError *)error {
345+
NSLog(@"Call is reconnecting");
346+
347+
[self.placeCallButton setTitle:@"Reconnecting" forState:UIControlStateNormal];
348+
[self toggleUIState:NO showCallControl:NO];
349+
}
350+
351+
- (void)callDidReconnect:(TVOCall *)call {
352+
NSLog(@"Call reconnected");
353+
354+
[self.placeCallButton setTitle:@"Hang Up" forState:UIControlStateNormal];
355+
[self toggleUIState:YES showCallControl:YES];
356+
}
357+
338358
- (void)call:(TVOCall *)call didFailToConnectWithError:(NSError *)error {
339359
NSLog(@"Call failed to connect: %@", error);
340360

ObjCVoiceQuickstart/ViewController.m

+20
Original file line numberDiff line numberDiff line change
@@ -376,6 +376,12 @@ - (void)cancelledCallInviteReceived:(TVOCancelledCallInvite *)cancelledCallInvit
376376
}
377377

378378
#pragma mark - TVOCallDelegate
379+
- (void)callDidStartRinging:(TVOCall *)call {
380+
NSLog(@"callDidStartRinging:");
381+
382+
[self.placeCallButton setTitle:@"Ringing" forState:UIControlStateNormal];
383+
}
384+
379385
- (void)callDidConnect:(TVOCall *)call {
380386
NSLog(@"callDidConnect:");
381387

@@ -388,6 +394,20 @@ - (void)callDidConnect:(TVOCall *)call {
388394
[self toggleAudioRoute:YES];
389395
}
390396

397+
- (void)call:(TVOCall *)call isReconnectingWithError:(NSError *)error {
398+
NSLog(@"Call is reconnecting");
399+
400+
[self.placeCallButton setTitle:@"Reconnecting" forState:UIControlStateNormal];
401+
[self toggleUIState:NO showCallControl:NO];
402+
}
403+
404+
- (void)callDidReconnect:(TVOCall *)call {
405+
NSLog(@"Call reconnected");
406+
407+
[self.placeCallButton setTitle:@"Hang Up" forState:UIControlStateNormal];
408+
[self toggleUIState:YES showCallControl:YES];
409+
}
410+
391411
- (void)call:(TVOCall *)call didFailToConnectWithError:(NSError *)error {
392412
NSLog(@"Call failed to connect: %@", error);
393413

Podfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ source 'https://github.com/CocoaPods/Specs.git'
33
workspace 'ObjCVoiceQuickstart'
44

55
abstract_target 'TwilioVoice' do
6-
pod 'TwilioVoice', '~> 3.0'
6+
pod 'TwilioVoice', '~> 4.0'
77

88
target 'ObjCVoiceQuickstart' do
99
platform :ios, '10.0'

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ Please ensure that after deleting the Push Credential you remove or replace the
315315
You can find more documentation on getting started as well as our latest AppleDoc below:
316316

317317
* [Getting Started](https://www.twilio.com/docs/api/voice-sdk/ios/getting-started)
318-
* [AppleDoc](https://media.twiliocdn.com/sdk/ios/voice/latest/docs)
318+
* [AppleDoc](https://twilio.github.io/twilio-voice-ios/docs/latest/)
319319

320320

321321
## Twilio Helper Libraries

0 commit comments

Comments
 (0)