Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/ssh/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Swift 斯威夫特2号上的辛奇_Swift_Sinch - Fatal编程技术网

Swift 斯威夫特2号上的辛奇

Swift 斯威夫特2号上的辛奇,swift,sinch,Swift,Sinch,我是新开发IOS应用程序的,我还在学习,但我不能处理来电 我不知道如何委托和重写该方法。有人能用swift 2写一个小例子吗 这就是我现在所拥有的,如何重写didReceiveIncomingCall方法 import Foundation import UIKit class LoginView: UIViewController, SINCallClientDelegate, SINCallDelegate{ @IBOutlet weak var labelUsuario: UI

我是新开发IOS应用程序的,我还在学习,但我不能处理来电

我不知道如何委托和重写该方法。有人能用swift 2写一个小例子吗

这就是我现在所拥有的,如何重写didReceiveIncomingCall方法

import Foundation
import UIKit

class LoginView: UIViewController, SINCallClientDelegate, SINCallDelegate{

    @IBOutlet weak var labelUsuario: UILabel!
    @IBOutlet weak var nameUsername: UILabel!
    @IBAction func buttonDesconectar() {
        //Add Disconnect code for VOIP

        let defaults = NSUserDefaults.standardUserDefaults()
        defaults.removeObjectForKey("usuario")
        self.performSegueWithIdentifier("segueLoginViewToInicio", sender: self)

    }
    override func viewDidLoad() {
        super.viewDidLoad()

        let vozIP = Sinch.clientWithApplicationKey(<APP_KEY>, applicationSecret: <APP_SECRET>, environmentHost: "sandbox.sinch.com", userId: "Roke" )

        vozIP.setSupportCalling(true)
        vozIP.setSupportActiveConnectionInBackground(true)
        vozIP.start()
        vozIP.startListeningOnActiveConnection()   
    }
}

您应该从Internet上删除应用程序密钥和密码!谢谢,真是个错误:@Roke如果还没有完成,现在就去更改API密钥。StackOverflow由Google编制索引…你好,Eric,我给Sinch Support发送了一封电子邮件。在我的仪表板中没有任何按钮可以删除或更改它。他们将很快删除此应用程序。谢谢你的建议。