08-18-2014 03:33 PM
Hey Guys,
I am working on an iOS app that uses the Jabber Guest SDK to make a call to an endpoint on my call manager. While building it i am pointing to the sandbox setup and have tested its connection from my device with another app.
My first view controller has no special code in it, just an image for a background and a button that has a push segue into the jabberGuestViewController. The app is written entirely in swift. I do have a bridging header file to import the jabber guest framework into my swift files. Also I have a single .mm file in the supporting files folder, its blank but its there. I have gone through the troubleshooting steps the jabber guest page but it doesn't talk about this error.
When I get the error which says "No Server Connection The Jabber Guest server is not reachable" the console shows "2014-08-18 15:30:25.652 AppName[1342:60b] Reachability Flag Status: -R -----l- networkStatusForFlags"
Here is the code from my JabberGuestViewController.swift file:
import UIKit
class JabberGuestViewController: UIViewController, CJGuestCallViewControllerDelegate {
override func viewDidLoad() {
super.viewDidLoad()
//Jabber Server and URI
let jabberServer = "jabberguestsandbox.cisco.com"
let uri = "5555"
let callControl = CJGuestCallViewController()
callControl.serverName = jabberServer
callControl.toURI = uri
callControl.delegate = self
self.navigationController.pushViewController(callControl, animated: true)
let notificationCenter = NSNotificationCenter.defaultCenter()
let mainQueue = NSOperationQueue.mainQueue()
var jabberObserver = notificationCenter.addObserverForName(CJGuestCallErrorNotification, object: nil, queue: mainQueue) { _ in
println("Jabber Error Triggered")
}
}
//
// override func callFinishedForCallController(callController: CJGuestCallViewController!) {
// callController.navigationController.navigationBarHidden = false
// callController.navigationController.popViewControllerAnimated(true)
//
}
}
Anyone have any ideas?
Thanks!
08-19-2014 11:21 AM
Thomas-
Do you see any other diagnostic output in XCode's console if you debug you app live? The SDK does have an API that can be leveraged to retrieve diag files, but it's just easier to pull from the console.
steve
08-19-2014 11:28 AM
Hey Steve,
When I run the app on the iPad connected to Xcode i get this error when ever I try to connect to a call using Jabber Guest:
2014-08-18 15:30:25.652 AppName[1342:60b] Reachability Flag Status: -R -----l- networkStatusForFlags
The app will go to the Call View Controller and will ask me to accept the license for the video like you would expect but it just can't connect to the server.
Tom
08-19-2014 01:07 PM
Tom-
I will contact you via email on how to proceed next. When we reach resolution, we'll update the thread here so others can see as well.
08-22-2014 05:39 PM
Turns out the issue was a button was triggering a segue defined on a Storyboard that led to a view controller object that was of the CJGuestCallController class. This is fine to do, but you need to prepare the segue to provide the data (servername, uri) for the CJGuestCallController.
You'll need to name the segue ("StartJG" in this example) on the Storyboard and in the originating view controller, add something like the following (this is for Swift)...
override func prepareForSegue(segue: UIStoryboardSegue!, sender: AnyObject!) {
if ( segue.identifier == "StartJG"){
println("prep for segue")
let callControl: CJGuestCallViewController = segue.destinationViewController as CJGuestCallViewController
callControl.serverName = "jabberguestsandbox.cisco.com"
callControl.toURI = "5555"
callControl.delegate = self
}
}
Also, to return control to the originating view controller when the call is done, make sure the originating view controller is a delegate of CJGuestCallViewController and and this (again, this is the Swift code)...
func callFinishedForCallController(callController: CJGuestCallViewController!) {
callController.navigationController.navigationBarHidden = false
callController.navigationController.popViewControllerAnimated(true)
}
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide