0
A
回答
2
這是怎麼了,我終於做工作:
class ViewController: UIViewController ,SINCallClientDelegate, SINCallDelegate , SINClientDelegate{
@IBOutlet weak var callStatus: UILabel!
let sinchClient : SINClient = Sinch.clientWithApplicationKey("093f31d0-858a-4947-b29e-38bd5b2300c5", applicationSecret: "iBS+k7WmnUOfKr5w1wureg==", environmentHost: "sandbox.sinch.com", userId: "[email protected]")
var callClient : SINCallClient! ;
var call : SINCall! ;
var callClient : SINCallClient!;
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view, typically from a nib.
sinchClient.setSupportCalling(true)
sinchClient.start()
sinchClient.startListeningOnActiveConnection()
sinchClient.delegate = self
callClient = sinchClient.callClient()
}
func clientDidStart(client: SINClient!) {
print("Clien started")
}
func clientDidFail(client: SINClient!, error: NSError!) {
}
func clientDidStop(client: SINClient!) {
}
func client(client: SINClient!, logMessage message: String!, area: String!, severity: SINLogSeverity, timestamp: NSDate!) {
}
func callDidProgress(call: SINCall!) {
}
func callDidEstablish(call: SINCall!) {
callStatus.text = "Call Connected"
}
func callDidEnd(call: SINCall!) {
}
func client(client: SINCallClient!, didReceiveIncomingCall call: SINCall!) {
call.delegate = self;
call.answer()
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}
@IBAction func callMike(sender: AnyObject) {
let call : SINCall = callClient.callUserWithId("[email protected]")
call.delegate = self
}
}
相關問題
- 1. 在註冊後,Sinch再次註冊了通知unregisterPushNotificationDeviceToken
- 2. 如何在didMoveToView(Swift,SpriteKit)中註冊touch?
- 3. 如何在沒有Cocoapods的情況下使用帶Swift項目的Sinch SDK
- 4. 如何使用Autofac在非引用項目中註冊組件
- 5. 在Swift中註冊AURenderCallback
- 6. 如何在installshield中禁用字體註冊installscript MSI項目?
- 7. 如何ansible註冊字典的項目
- 8. 如何恢復tuleap註冊項目
- 9. 如何註冊Google APis項目?
- 10. 安裝項目沒有在註冊表中註冊
- 11. 在Windows安裝項目中註冊和取消註冊DLL
- 12. 在Swift中使用NSErrorPointer PARSE註冊
- 13. Sinch SDK - 如何註銷用戶?
- 14. 安裝項目COM註冊
- 15. 項目註冊迭代器
- 16. 如何在Swift中將註冊用戶寫入數據庫?
- 17. SignalR如何在項目中註冊其HTTP Handler?
- 18. 如何在github中查找新註冊的項目
- 19. 如何在django註冊中註冊註冊表格
- 20. 如何在Windows Server上正確註冊註冊表項?
- 21. 應用程序項目尚未註冊
- 22. 從庫項目中註冊GCM
- 23. netstandard1.6中的註冊表類; net46項目
- 24. POMM2在Symfony3項目,註冊轉換器
- 25. 在swift 2.0中註冊/登錄錯誤
- 26. 如何在Swift項目上使用BSKeyboardControls?
- 27. 如何通過sinch和parse將消息廣播給所有註冊用戶?
- 28. 新建項目遞歸註冊表項
- 29. 在新的Firebase項目中使用相同的註冊用戶
- 30. 如何讀取子項在註冊表
你可以添加一些代碼以及你正在嘗試做什麼 – cjensen