Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class CaruselleScreenInteractor: AWSDKMatchmakerDelegate, AWSDKVisitDelegate {
- }
- That gives us the ability to extend some functions in our classes regarding the visit error handling
- class CaruselleScreenInteractor: AWSDKMatchmakerDelegate, AWSDKVisitDelegate {
- func providerListExhausted() {
- print ("providerListExhausted")
- }
- func matchmakerFailedWithError(_ error: Error?) {
- print ("matchmakerFailedWithError")
- }
- func visitUpdateDidFail (_ error: Error?) {
- print ("visitUpdateDidFail ")
- }
- }
- //We attach the delegates in our callbacks, the MatchmakerDelegate in the startMatchmakerServiceWithVisit:
- AWSDKVisitService.startMatchmakerServiceWithVisit(visit: visit, delegate: self as AWSDKMatchmakerDelegate, completion: { (success, error) in
- guard error == nil else {
- self.carusellePresenter?.onError(message: error?.localizedDescription ?? GlobalSDK.onNilError)
- return
- }
- guard success else {
- self.carusellePresenter?.onError(message: error?.localizedDescription ?? GlobalSDK.onErrorInitlizingVisit)
- return
- }
- })
- getVisit().delegate = self
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement